Evertjan. a écrit :
Not working on my Mac :-(
(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 ... :-(
Only if you use menu (and not use keyboard shortcuts)
--
sm
>
Try, IE7 & FF2 tested:
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="ret urn IsNumeric(event );">
>
<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!!!!!
>
<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
Comment