I\'m using jQuery\'s $.ajax
function to submit a form, which works, but the success is where I\'m having my problem. Here is my code:
$(\"#form\
How to find the answer yourself:
Place a debug code to see what you get from the server.
$("#form").submit(function () {
$.ajax({
type: "POST",
url: '/login/spam',
data: formData,
success: function (dataCheck) {
console.log(dataCheck); // <==============================
if (dataCheck == 'value') {
//Do stuff
}
}
});
return false;
});
It will probably be in other format than you think.