Topic: validation on a html form

I want to use embedded javascript to validate a field in my form, where the user will enter a number, i dont want it to have anything else other than numbers in that field.

ive looked at some examles but i cant seem to figure it out.

can sumene lease help me out?

Vote up Vote down

Re: validation on a html form

Take a look at this -- it's relatively straight-forward. Just a matter of adding a "onkeyup" attribute to the input, and including a javascript function to check the value of the input. Basically, the function automatically checks that any characters entered are numbers only.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down