I am using below code the data form other page coming properly but while i am showing this in html page, the if condition is not working properly, whatever the result it going only with the if condition not in the else condition.
both the time code of if part is working.
alert("Already exit pls change!");
double =, otherwise you’re not confronting the two variables, but assigning the value of the second to the first (and that always gives true as a result).
Hi guido2004 ,
Thanks its working but yesterday i used this == also but was giving the same problem,
don’t know but this time its working.
As I understand it, === is a literal comparison of both type and value, whereas == is a loose comparison that will convert in order to be a more open comparitor. Right?
Yes and since you can’t always tell what type they will be converted to it is better to use the appropriate functions to convert them to the same type and use ===