<PUBLIC:ATTACH EVENT="onkeypress" ONEVENT="keyPress()"/>
<SCRIPT LANGUAGE="JScript">
function keyPress(){
if (!(window.event.keyCode >= 48 && window.event.keyCode <= 57) && !
(window.event.keyCode == 46)){
window.event.keyCode = 0;
}
}
</SCRIPT>
Hello... I'm new to HTC/JScript thing.
I have a textfield that uses the JScript behavior above.
(The JScript above only accepts 0-9 and .)
I want to customize my textfield such that only numbers/decimals can
be entered like:
2.45, 8.456 and 8. Not texts like "..5" or "." or "1.25..." or
"1..53." and the like.
Is that possible with JScript? Please do reply... Thanks a lot.