View Full Version : client side form validation

12-10-2007, 04:38 AM
Hey guys...

anyone seen some good examples of javascript form validation... well not necessarily validation but you kno that sort of web2.0 forms approach.

For example where when you click on a input button, the whole area around it becomes highlighted (attracting attention to the user)

I kno i've seen this approach in several places, but cant think where at the moment. Wordpress uses similar approaches when you post a article (yellow background fading out)

i guess it could be ajax approach, but either way i need some examples to work off please.. Cheers

12-10-2007, 06:02 AM
you can use the className method

how do you want this to work. You wanting the form field to change colour or the area around it or the area around a group of fields?

and when does it change. On what event

12-10-2007, 07:16 AM
its called fade to yellow by most people i think

here a link to an example, maybe it will be of some use to you:


i think im right in saying that you can use the onBlur state to highlight a form field, and then add your coloured border

12-10-2007, 07:59 AM
does it have to animate