Is it possible to submit form multiple times with different actions from HTML. i.e.
document.forms[0].action = "action1.do"; //It insert the data into database and redirect to other page in same tab.
document.forms[0].submit();
document.forms[0].action = "action2"; // Its generate a report with data inserted by action1 in new tab.
document.forms[0].target = "_blank";
document.forms[0].submit();
Form are submitting twice but the problem is second one is submitting in between the first one completion.
Please help how can i make sure that the second form submission will happen only after the first one completed.