southbeach
Programmer
I have this script
The HTML is something like this
I was hoping that by using 'return' within the onkeyup event, I would effectively negate the last key stroke.
It does not work! What is my solution?
Thanks,
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
Code:
function numberOnly(val) {
var isNumber = !isNaN(val);
if(isNumber){
if(val.indexOf('e') != -1){
isNumber = false;
}
}
return isNumber;
}
The HTML is something like this
Code:
<input name='field' id='fieldID' onkeyup='return numberOnly(this.val);' />
I was hoping that by using 'return' within the onkeyup event, I would effectively negate the last key stroke.
It does not work! What is my solution?
Thanks,
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.