Initially, I was trying that. I got the same error. -----Original Message----- From: Brice Ruth [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 5:36 PM To: Struts Users Mailing List Subject: Re: Form submission through java script
Why are you setting the document.form.action? Just call document.form.submit() - the JavaScript will automatically know what to do and where to submit to. Shishir K. Singh wrote: >Hi, > >I have a form with one drop down menu list and two buttons (continue >and previous ). The two buttons are hooked up to the >LookupDispatchAction where I process the code as required by the action >of the button. Everything works fine if I use the buttons. > > >My requirement is that when I click on any one value of the list box, >the form should get submitted. I am trying to use Javascript to do the >same. > >In the onclick of the select html:select, I have a function called >submit() > >The submit function looks like this > > > ><script language="text/javascript"> > function submit() { > document.form.action = >http://localhost:8081/createContentAction.do > document.form.submit() > } > ></script> > > >And my form action is > > ><html:form action="/createContentAction"> > > > > > >When I click any value in the drop down, I get this error : > > >javax.servlet.ServletException: Request[/createContentAction] does not >contain handler parameter named action > at >org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAc >t >ion.java:199) > at >org.apache.struts.action.RequestProcessor.processActionPerform(RequestP >r >ocessor.java:484) > at >org.apache.struts.action.RequestProcessor.process(RequestProcessor.java : >274) > at >org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) > at >org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic >a >tionFilterChain.java:247) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil >t >erChain.java:193) > at >org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorF >i >lter.java:226) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic >a >tionFilterChain.java:213) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil >t >erChain.java:193) > at >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal >v >e.java:243) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.j >a >va:566) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: >4 >72) > at >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal >v >e.java:190) > > >Can anyone pls tell me where am I going wrong or what more needs to be >done ?? > >TIA >Shishir > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]