abort user from typing certain chararcters
Posted: Wed Feb 28, 2007 3:43 am
Case:
Suppose i have a input text field which is supposed to take only numbers ie 0-9
If the user types any alphabets or any non numeric no then Javascript
should display the alert at the time and writing and then any written alphabets or any non numeric no should be deleted.
I mean to say is that suppose i am typing 123 and then try to write `q` then at that instant JS
should give alert and delete that written `q`.
Its very challenging for me...But Hope I will get my problem solved ...How ??
Obviously from this forum...hehehe............
Thanks in advance to all of you !!
Suppose i have a input text field which is supposed to take only numbers ie 0-9
If the user types any alphabets or any non numeric no then Javascript
should display the alert at the time and writing and then any written alphabets or any non numeric no should be deleted.
I mean to say is that suppose i am typing 123 and then try to write `q` then at that instant JS
should give alert and delete that written `q`.
Its very challenging for me...But Hope I will get my problem solved ...How ??
Obviously from this forum...hehehe............
Thanks in advance to all of you !!