Do you have mutiple forms on the page? Your JS function takes an argument which it ignores and always sets the action of 'myForm'.
Try debugging with a JS alert just before you submit, showing the action value for your action. Having said all that, I would set the method via a hidden field on your form rather than modifying the action. HTH, Paul > -----Original Message----- > From: Heligon Sandra [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 12, 2004 8:42 AM > To: '[EMAIL PROTECTED]' > Subject: Action parameter and JavaScript > > > I use a JavaScript in a form to set an action. > But I am the following problem, I should pass > a parameter to the action. I would like to know > the syntax. > > Here is my code: > > <script> > > function updateForm(form) > { > myForm.action='/myLookupDispatchAction.do?method=newSVC_One'; > myForm.submit(); > return true; > } > > </script> > > <html:select onchange="updateForm(document.forms[0]);"/> > > At the runtime when the combo box change the parameter method > is null. > I tried document.forms[0].method.value="newSVC_One"; > but it does not work. > > Thanks a lot in advance > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ********************************************************************** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]