Jump to content

Recommended Posts

Posted

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?

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...