<script language="text/javascript">
    function submit() {
        document.form.action =
http://localhost:8081/createContentAction.do?action="Continue";;
        document.form.submit()
    }

</script> 

but note:  I had to change the parameter name from
action to something else because the button named
"action" seems to conflict with the property "action"
on the form and I kept getting errors.

--- "Shishir K. Singh" <[EMAIL PROTECTED]>
wrote:
> I am getting the same error. 
> 
> The name of the button that I want to emulate is
> "action" and  the value
> is "Continue". Where/how do I set this parameter in
> the Java Script so
> that the LookupDispatchAction  is able to get the
> value.   
> 
> -----Original Message-----
> From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 10, 2003 5:42 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Form submission through java script
> 
> If you do a System.out on action, you will find it's
> null right now.
> You need to pass a valid action to the your dispatch
> Action so that it
> knows which handler to call.
> 
> >document.form.action='continue';
> 
> 
> -----Original Message-----
> From: Shishir K. Singh
> [mailto:[EMAIL PROTECTED]
> Sent: lundi 10 novembre 2003 15:33
> To: Struts Users Mailing List
> Subject: Form submission through java script
> 
> 
> 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(LookupDispatchAct
> ion.java:199)
>       at
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
> 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(Applica
> tionFilterChain.java:247)
>       at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:193)
>       at
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
> lter.java:226)
>       at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:213)
>       at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:193)
>       at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:243)
>       at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
> 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(StandardContextValv
> 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]
> 
> 
>
---------------------------------------------------------------------
> 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]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to