You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raj Atchutuni <ra...@yahoo.com> on 2003/04/01 01:03:53 UTC
Re: Form submit in struts
I am trying to submit the form with different actions basing on the user action. I am using java script to change the form action dynamically. struts config file has "/aboutus" action.
Here is my code. Some how form is submitted. Once i click the 'aboutus' link nothing is happening.
Can some one tell me what is going on please.
function setAction(action, link)
{
document.form.action = act;
document.form.method = "POST";
document.form.selectedGlobalLink = link;
document.form.submit();
}
<html:form action = "/demo" method = "POST">
<a href="#" onClick="setAction('/aboutus','2');">About Us</a>
</html:form>
---------------------------------
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!