dhtmlxcombo validating decimals
I have the following which validates for whole numbers only...
function checkNumbersOnly(val) {
if (val < 48 || val > 57 ){
alert('PLEASE NOTE: You can only type numbers in this field');
z1.setComboText(z1.getComboText().toString().replace(/[^0-9]+/g,""))
}
}
How do I amend it to validate for numbers with decimals too. What do I add to prevent it from automatically removing the decimal point every time I enter an illegal character (i.e. a letter)
Thanks,
Graham.