I need an help on How to submit 2 form's POST methods both with a one single click. Suppose that I have two seperate forms I want my secound form to be submited at the time I click on the first form action button.
Asked
Active
Viewed 264 times
-1
-
1Possible duplicate: http://stackoverflow.com/questions/8563299/submit-multiple-forms-with-one-submit-button – amito Sep 04 '15 at 21:23
-
1It is definitely a duplicate – Fabiano Francesconi Sep 04 '15 at 21:25
-
Yes looks like it is a duplicate! :( – Iman Nia Sep 04 '15 at 21:32
1 Answers
0
You need to do this with Javascript first place a button that is going to submit both forms like this in your html
<button type="submit" class='input_submit' style="margin-right: 15px;" onClick="submitBothForms()">submit both</button>
then your submitBothForm method has to includes these lines
document.forms["first_form_name"].submit();
document.forms["secound_form_name"].submit();

Iman Nia
- 2,255
- 2
- 15
- 35