I tried giving all the forms on the page the same form id or individual form id's with a unique.submit function. Neither seemed to work, always only the first form would work all the rest, would just kick me back to the homepage. see my code. code works great on pages with just one form, but when I have multiples it causes problems.
$("#sQuote").submit(function() {
//Send the serialized data to mailer.php.
$.post("mailerS.php", $("#sQuote").serialize(),
//Take our repsonse, and replace whatever is in the "formResponse"
//div with it.
function(data) {
$("#sQuote").html( $("#formResponse").html() );
}
);
return false;
});
});
I tried this with all the form id's = sQuote and the named them individually sQuote1 ect... and added another .submit for that unique ID
For what it's worth, on every single page all used id attributes have to be unique. Having more than one id attribute with the same value will lead to all kind of failure.
Validate your document with the W3 validator and fix the errors as a start. Duplicate ids will be reported as errors there.