1
Good afternoon, I have a code on html and js where I need to make a Submit in 3 forms using just one button, that’s because they’re on different cardboards. I thought I’d do it this way in html:
<form id="form1" method="POST"></form>
<form id="form2" method="POST"></form>
<form id="form3" method="POST"></form>
<button id="submit-forms" type="button" class="btn btn-success>
And in the JS:
$("#submit-forms").on("click" function(){
$("#form1").submit();
$("#form2").submit();
$("#form3").submit();
});
But it didn’t work out. Does anyone have any idea of a solution?
Where does java enter? There is nothing java in this code.
– user28595
When a form is sent the page is "reloaded" to the
action
, then I only see two ways, put it all together in one<form>
only and handles it on the server, or send it by javascript with AJAX.– fernandosavio
In fact, it makes sense yes, because my Divs, created for both page layout and organization, did not allow to be made only a form @Sam
– Samuel Machado
has this little Gambi here. Just change the page in the dynamic form action.
– Sam