Hi, I have a simple ajax app that returns a dataType of "text" with a string of either "yes" or "no".
The script works fine, but for some reason, when I try to use an if/ else statement to evealutae the response, it always return false. in the following example, my code will alert "yes" but the if statement acts as if the data variable is not equal to it, even when it is For example: var d = page.php?params; $.ajax({ type: "GET", url: "/ajax/processEmail.php", data: d, dataType: "text", success: function(theData, msg){ alert(theData); if(theData=="yes") { do this; } else { do this; } }); any ideas?