aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes background color in a form field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "background color in a form field" Watch "background color in a form field" New topic
Author

background color in a form field

Soft Music
Greenhorn

Joined: Jan 17, 2002
Posts: 5
I have a form with many text input fields and the fields are located in a table. Initially the text input fields have some kind of background color.
I use an external .js file to do edit check on the fields passing the form as parameter. If any fields are wrong, the .js file will change its background color to red and display an error msg for user to correct the error. Then the user will try to submit the form again and the .js file will again do the edit check. If the newly corrected field has no error, I want to change its background color to its initial background color. How do I remember that initial background color in javascript? Becaus now the input background color is red at this point.
Any help will be appreciated,
Soft Music
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

Soft Music,
sorry but i dont know js very well.
I hate to say this but, your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
please register again with a valid name.
your name should at least look like a real name


SCJP
Visit my download page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: background color in a form field