This is a discussion on "Add class if input not empty on-the-fly" within the JavaScript Forum section. This forum, and the thread "Add class if input not empty on-the-fly are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Add class if input not empty on-the-fly
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
How could I check if any input in a form is no longer empty, and if so give it a class 'ent', in real time.
And if a user went back and deleted the contents of the input, the class would be removed. Many thanks Alex
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
|
|
||||
|
Re: Add class if input not empty on-the-fly
Well, i'm stating the obvious but javascript is done when the page loads right? But AJAX is done without needing Refreshing, so maybe that might be the key??
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
|
||||
|
Re: Add class if input not empty on-the-fly
I'm not sure if I'd need AJAX - I don't need to communicate with the server here.
It's hard to explain because I'm not sure how it works anyway How about this?
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
||||
|
Re: Add class if input not empty on-the-fly
THat could work. I've only just started working with Javascript, so I'm no expert.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| isset and empty | karinne | PHP Forum | 15 | Jan 28th, 2008 12:37 |
| [SOLVED] div class and div id | danny322 | Web Page Design | 1 | Nov 22nd, 2007 12:52 |
| FLASH - validating input fields if empty before clicking submit button | kyutkb | Flash & Multimedia Forum | 3 | Jul 24th, 2007 15:38 |
| array of class | janper | Flash & Multimedia Forum | 4 | Apr 9th, 2007 13:54 |
| asp script to show element if 2 recordset are both empty? | therese | Classic ASP | 4 | Dec 1st, 2005 10:24 |