J
js
I am using the following script to test if a variable is undefined or
blank. The alert is not fired, if varA is blank string (ie. "", " ",
" ", etc). I need to fire the alert even when varA contains blank
string. How can I do that? Thanks.
if (varA== undefined || parseInt(varA) == NaN)
alert("Variable varA is undefined or NaN");
else
//do somehting else;
blank. The alert is not fired, if varA is blank string (ie. "", " ",
" ", etc). I need to fire the alert even when varA contains blank
string. How can I do that? Thanks.
if (varA== undefined || parseInt(varA) == NaN)
alert("Variable varA is undefined or NaN");
else
//do somehting else;