I am using this code to get response back from server. But I want that asynchronously as I need to show progress. When I use this code, I don't get any messsage back from server (only getting alert as object). Here is my code. Any ideas?
var msg = $.ajax({
type: 'POST',
url: '../pages/registration.php',
async: true,
data: {
do: 'register'
},
beforeSend: function () {
$("#Progress").show();
},
success: function (data, status) {
$("#Progress").hide();
$("#AckMsg").html(data);
}
});
alert("aa" + msg);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…