|
-
Apr 13th, 2005, 08:36 AM
#1
Thread Starter
New Member
Onkeypress error
hi,
Every body i m working On the project the most essentiol part of the project is that i have text field which should hold numric data i want that when i press other than numeric data it show message box that you donot type this data here i have done but problem is that text show message box
bux when i click ok button the key i pressed is posted on the text
let
12t
when i press t it will show error but also post it in text box
i want that it should clear t but why i m in java script programer
please tell the code
Code:
function validing()
{
if (document.form.text1.value=='t')
show error
else not
show error
<intput type="text" name="text1" onkeypress()="validing()">
Last edited by Jeaysindh; Apr 14th, 2005 at 06:34 AM.
Reason: writig cod
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|