Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form action change

Status
Not open for further replies.

kd2004

Technical User
Jan 1, 2004
1
US
In my JSP I set specific action name (/action1.do)using html:form.
For different hypher link click I would like to submit to different action name(/action2.do) with javascript validation.

I am trying to change the form action value using javascript and submitting that if validation succeed.

document.forms[0].action=/action2.do;
document.forms[0].submit(); // not working

second submit call is not working . Action value is changed but it is not submitting the form. Any help.

Thanks in advance.
 
Hi,


I am not sure why it is working coz, I use a similar JavaScript function in my form.
Try to put the action in single or double quotes.
document.forms[0].action='/action2.do';
document.forms[0].submit(); // not working


Cheers,
Venu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top