PDA

View Full Version : Form Validation



Lacuna
July 13th, 2005, 02:09 PM
Hey,

Heading towards the user-friendly environment, and can't figure out how to do instant validation. I don't want the user to click the button and then find out the fields that are wrong.

I need the user to not be ABLE to type incorrect information into the field in the first place.

Anyone done this before?

~ Lacuna :love:

Yeldarb
July 13th, 2005, 02:54 PM
<input type="text" onChange="javascript:check(this)" />



<script type="javascript">
function check(field) {
//Your checks on "field" here.
//And Do Whatever.
//The key is the onChange event handler.
}
</script>