>Not working on my Mac :-(
Try, IE7 & FF2 tested:
(FF2, Safari2)
keys with keyCode 48 to 57 need the shiftkey in addition to get a number
from alpha keyboard
- works with Safari
- not with F2 who return a keyCode for the shift's key
(not in the allowed plage :-( )
keys from numeric keyboard aren't more allowed ... ! :-(
But I can tape : @ & $ €
And no more backspace ... tab ... enter ... :-(
<input type="text" onkeypress="return IsNumeric(event);">Only if you use menu (and not use keyboard shortcuts)
<script type='text/javascript'>
function IsNumeric(e) {
var c = e.keyCode? e.keyCode : e.charCode
if (c >= 48 && c <= 57)
return true;
alert('Only Numbers, please.');
return false;
};
</script>
This will not prevent pasting alpha strings!!!!!
--
sm