Ajax submit error or not?
This submit handler returns the echo "success" from the php script but only performs the error action (loading error msg div) any ideas? this is driving me crazy!
submitHandler: function(form) {
var dataString = $(form).serialize();
$.ajax({
type: $("#request").attr('method'),
url: form.action,
data: dataString,
clearForm: true,
success: function(data) {
if (data=="success") {
//$("#request").remove();
//$("#supportSuccess").fadeIn("slow");
alert("Details saved successfully!!!");
} else {
$("#request").css("border","1px solid red");
//$("#supportError").fadeIn("slow");
}
}
});
i just added the css border to test what is being fired, it always returns succes but adds the red border/error?