I\'ve created a php page with two forms but I would like to have only one submit button for both forms. the forms have the id
s firstform
&
Here's the jsfiddle to demonstrate.
http://jsfiddle.net/TqhPr/18/
HTML
JavaScript
$(document).ready(function() {
$("#both").click(function() {
document.getElementById("f1").submit();
document.getElementById("f2").submit();
});
if(document.location.hash == "#close") {
alert("closing the window caused by posting the first form");
window.close();
}
if(document.location.hash) {
alert(document.location.hash);
}
});