javascript - If else statement not giving expected result -
data1 variable contanins "notexist" string executing else statement.
if(data1=="notexist") { document.getelementbyid("errcorrectwfrm").style.display="inline"; return false; } else{ alert("thanks choosing albc,now can go ahead"); $.modal.close(); }
it seems data1 value not same expecting code executing else statement. kindly console.log(data1) or alert(data1) come know exact value in it.
i assuming there might white space somewhere in data1 value causing problem. kindly check length of string , come know.
hope helps
Comments
Post a Comment