jasat_mafioso Posted January 14, 2009 Report Share Posted January 14, 2009 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? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 15, 2009 Report Share Posted January 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.