-
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()">
:wave:
-
Re: Onkeypress error
Post the code that you have so far for that function. Without seeing your code and knowing what is on the form, it's hard to say what's wrong.