Hi,
I have the following script which only allows numeric values, I want to be
able to allow for the delete key as well, can someone advise me on how I
can do this.
Thanks
Script:-
<SCRIPT language=javascript>
var isIE = document.all?true:false;
var isNS = document.layers?true:false;
function OnlyDigits(e) {
var bolOnlyDigits = true;
if (isIE) {
if (window.event.keyCode < 46 || window.event.keyCode > 57)
{
window.event.keyCode = 0;
bolOnlyDigits = false;
}
}
if (isNS) {
if (e.which < 46 || e.which > 57) {
e.which = 0;
bolOnlyDigits = false;
}
}
return (bolOnlyDigits);
}
</SCRIPT>