Javascript - If and or statements - IE Undefined -
i confused why wont work...
in chrome when click button runs script, textbox pops empty, check length > 0.....
in ie, populates undefined, thought check value , if != undefined...
if (strtemp.length > 0) { if (strtemp.value != "undefined") { printlabels(strcarrier, strtemp); } else { alert('you wont labels until tell why...'); } } else { alert('you wont labels until tell why...'); }
anybody have ideas of doing wrong?
if value undefined
, it's not string. should checking if (strtemp.value != undefined)
.
see undefined
on mdn.
Comments
Post a Comment