pinaldave
asked on
text box on blur validation for empty field
hello,
I am using following script to make sure in the text box that when I leave it ... it allows does not allow anything else than numeric. Numbers are allowed only. Empty string should be allowed but when user leave the text box the empty string should be converted to zero automatically.
How can I do this>>>
When user leaves the text box the empty string is replaced by Zero (0) Digit.
This is what I have >>>
onBlur="if (/\D/.test(this.value)){al ert('Pleas e enter the digits only');this.focus()}""
Regards,
I am using following script to make sure in the text box that when I leave it ... it allows does not allow anything else than numeric. Numbers are allowed only. Empty string should be allowed but when user leave the text box the empty string should be converted to zero automatically.
How can I do this>>>
When user leaves the text box the empty string is replaced by Zero (0) Digit.
This is what I have >>>
onBlur="if (/\D/.test(this.value)){al
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your very welcome, thank you for the grade.
Cheers
Scott
Cheers
Scott
ASKER
Regards,
---Pinal