hey, i am using the following function,
$.ajax({
type: 'POST',
url: "/User/SaveMyDetailsSettings",
data: mySettings.MyDetailsForm.serialize(),
success: function (data) {
alert("callback");
alert(data);
if (data == "Success") {
window.location = "User/MySettings";
}
else if (data == "Failed") {
alert("Sorry!! Failed to submit your settings");
}
}
});
and this is added on the click event of a button( which is a simple link), but the problem here is that it does'nt wait for the response and it directly, calls the success function. Please help!!