Click to See Complete Forum and Search --> : textfield always a string


KeesMat
12-25-2003, 05:34 AM
In a textfield I want to check if it is a number or integer.
But on if(g00.value == NaN || g00.value < 0) // g00 is the name of the textfield
The browser do's not react and on if(g00.value != Math.int || g00.value < 0) IE reacts by promting but Netscape asks for a value for the operator Math.int.
What do i do wrong?

Pittimann
12-25-2003, 05:45 AM
Hi!

You could do something like that:
if(isNaN(document.formname.g00.value)){
do stuff...
}

Cheers - Pit