M
Martin Nadoll
Hello,
I am working on a form-validation script.
There is a input-field where you input a float or integer numper (maximum
price to output in database-query).
But my Cold-Fusion Query generates a >error-message, if there is more than
one dot in that value e.g. 15.60.50
Is it possible to validate, that there is only one or no dot given as value
for that field?
i tried with:
if (document.myForm.myInputField.value.indexOf(".")>1) {
alert ("Please not more than one dot!!")
return false
}
but that doesn't work
Thanks for any help,
Martin Nadoll
I am working on a form-validation script.
There is a input-field where you input a float or integer numper (maximum
price to output in database-query).
But my Cold-Fusion Query generates a >error-message, if there is more than
one dot in that value e.g. 15.60.50
Is it possible to validate, that there is only one or no dot given as value
for that field?
i tried with:
if (document.myForm.myInputField.value.indexOf(".")>1) {
alert ("Please not more than one dot!!")
return false
}
but that doesn't work
Thanks for any help,
Martin Nadoll