Hi,
I have a $.ajax call in my jquery function.
I want to access the value returned from the server(php) to be accessed in jquery function. Hoe to do this??
setTimeout(function(){
$.ajax({
url: 'ajax-validation.php',
data: 'email=' + $('#email').val(),
dataType:'text',
type: 'post',
success: function (resp) {
if(resp=="Email is available")/*This does not seems to work*/
return true;
else
return false; /*False is returned always*/
emailInfo.text(resp);//This works. The text is shown in html page...
}
});},800);
t.lastValue = t.value;
}