Hi everyone,
can anyone explain me why following code alerts me nothing:
var text = $.ajax({
type: "POST",
url: "registration.php",
data: "email=" + elementValue
}).responseText;
alert(text);
but when I add option "async: false":
var text = $.ajax({
type: "POST",
async: false,
url: "registration.php",
data: "email=" + elementValue
}).responseText;
alert(text);
everything goes ok. Why is that? what does asynchronous actually mean?
P.S.: server code registration.php is ok.