I got some trouble submitting a form with ajax.
Since HTML5 Form already have “required” validation within the input tag, there is no need for javascript validation check. However, because of that, I don’t know how to use javascript(jQUERY) to submit a form AFTER those validation checks have been passed. In other words, how do I know whether the validations checks has passed or not?
e.g :
??condition?? (What condition should I put before loading the submitted page)?
(“div”).load(finishSubmittingForm.html)
)};
Any idea?
Thanks
There are some API methods available. See developer.mozilla.org.
However, I would strongly advise you think carefully before relying on HTML5 validation. It definitely has some major drawbacks at this point in time, as it is still “in its infancy”. I would say that for now, you would be better off using a JS validation library; jQuery Validation is excellent.