Forum Moderators: open
if(parseInt(numb)!=numb-0) {
alert("Please Enter Integer Only ok")
document.forms[0].text.focus();
}else{
if (window.RegExp &&!integer.test(myform.text.value)) {
document.forms[0].text.focus();
alert("Invalid integer value entered (regular expression)");
}else{
alert("U entered correct "+numb);
}
}
}
</script>
1. it may be smarter to use onchange() instead of onblur(). My Firefox gets into an endless loop with the combination of onblur() and alert().
2. valid HTML: put the <script> block in the <head> section of your page, or in the <body>, if you prefer.
No solution for the focus()-issue, sorry...