I have 2 <apex:form>
tag on Visualforce page. like below -
<apex:form id="form1">
-
-
- Some input fields are here
-
</apex:form>
<apex:form id="form2">
<apex:commandButton title="Save & Continue" value="Save & Continue" action="
{!saveApplication}" />
</apex:form>
Now my requirement is when i click on this form2's "Save & Continue"button then form1 should be submitted and controller's saveApplication
function should be called.
I know in Java i can write a java script function and can call it on "Save & Continue" button's onClick event. like this -
function submitForms()
{
document.form1.action = saveApplication.do;
document.form1.submit();
}
but how can i do it in salesforce?
Thanks in advance