I'm trying to only allow number keys, period, decimal point, and dash.
Why does this generate an error? Something is wrong with my if statment syntax.
Thanks,
Aaron
Why does this generate an error? Something is wrong with my if statment syntax.
Code:
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if ((charCode >= 48 && charCode <= 57) || charCode = 189 || charCode = 190 || charCode = 110)
return true;
return false;
}
//-->
</SCRIPT>
Thanks,
Aaron