[jQuery] [validate] SubmitHandler breaks form uploading?
$(document).ready(function(){
$("#recipename").focus();
$("#submitrecipe").validate({
errorElement: "div",
errorPlacement: function(div, element) {
div.insertBefore( element )
},
rules: {
servings: {
required: true,
digits: true
}
},
submitHandler: function() {
document.getElementById("submitted").innerHTML = "Uploading now
please wait";
document.submitrecipe.submit.value="Please wait";
document.submitrecipe.submit.disabled=true;
}
});
});
Hi, I do not get any javascript errors and everything works fine,
press submit and I get the "uploading" message and the button gets
disabled and its text changes. The problem is that nothing else
happens!
As soon as I delete submitHandler... } then the form works again. Any
ideas?
Thanks, Kevin