mitesh114
asked on
testing if input field is empty onblur
Hi,
when a user clicks into an input field, onblur, I want to test if that field has been left blank. Currently, I have tried
if (strString == "") but it doesn't work. does anyone know the correct syntax to use?
Thanks
Mitesh
when a user clicks into an input field, onblur, I want to test if that field has been left blank. Currently, I have tried
if (strString == "") but it doesn't work. does anyone know the correct syntax to use?
Thanks
Mitesh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem was that just above my code, I had:
if (strString.length == 0) return false; which was preventing me from testing an empty string.