This code is responsible for preventing users from entering non-numeric characters such any any ascii except number [0-9]. Works fine in in IE, but not in Firefox and Chrome. Any help and suggestions are highly appreciated.
Thank you
'oKeyPress': function (e) {
e = e || window.event;
var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
return !(charCode > 31 && (charCode < 48 || charCode > 57));
}