I have a requirement to submit two forms ( each form to a different strut action class ) on click of a submit button from JSP. Any idea how this can be achieved? Is it OK if i write a java script method and inside the method i write the two form submit as below?
Please let me know if there is any other way of doing it.By the way form1 will submit to a different url (different application) and form2 will submit to an action class on the same application.
Also i have read that two forms can't be submitted from a JSP at the same time.
I have an OK button on my JSP and on click of that OK button, i am suppose to send some parameter as POST to another application in a new window( i.e. a new browser window should open on click of OK). At the same time, i also need to forward the request to another screen which is a summary screen on the same application. So it is not possible for me to combine these two activities into one.
If you submit 2 forms, the last one will get submit . so this is not correct approach. and I think, I got your requirement. just follow the below steps,
create 2 forms like below, first one will be your main window and second form will be submitted to your popup(see the target attribute)
does that make sense?
Joined: Apr 14, 2012
thanks i will try this. But i have one question. Here also there is two form submit right? So in this case also only the last submit will work right? (document.getElementByID('go').click) ? Please could you explain?