Here is the javascript code to accept only numeric values in textboxes. This has to binded to
"onkeypress" event.
function onlyInteger(evt)
{
evt = window.event;
var charCode = evt.keyCode;
if (charCode > 31 && (charCode <> 57)) {
status = "This field accepts numbers only.";
return false;
}
status = "";
return true;
}
-::-
Tuesday, July 29, 2008
Subscribe to:
Posts (Atom)