You can use the following code to dynamically generate the action where the submit is to happen.
function linkEditClick() { document.formName.action="/editAction?id=" + document.formName.comboName.value; document.formName.submit(); } function linkAddClick() { document.formName.action="/addAction?id=" + document.formName.comboName.value; document.formName.submit(); } function linkDeleteClick() { document.formName.action="/deleteAction?id=" + document.formName.comboName.value; document.formName.submit(); } these functions can be called on the onclick event of the respective links. Avjit On Thu, 07 Jul 2005 Nitesh Naveen wrote : >You could use JavaScript to submit the form on clicking the link. >Have a hidden field to track which link is clicked. > >For e.g.. Use this function in the link... > >function clickLink(linkId) >{ > document.formName.hiddenElementName.value=linkId; > document.formName.submit(); >} > >PS: you need to make sure there are no fields in your form with the name - >submit > >HTH, > >Nitesh >_____________________________ > >Disclaimer: >Information contained and transmitted by this e-mail is confidential, >proprietary, and legally privileged data of Cordiant Technologies that is >intended for use only by the addressee. If you are not the intended >recipient, you are notified that any dissemination, distribution, or copying >of this e-mail is strictly prohibited and you are requested to delete this >e-mail immediately and notify the originator. Any views expressed by an >individual do not necessarily reflect the view of Cordiant Technologies. The >recipient should scan this email and any attachments for viruses as Cordiant >Technologies is not liable for the presence of viruses in this email. >Cordiant Technologies does not accept liability for any errors or omissions >as the internet communications cannot be guaranteed to be timely, secure, >error or virus-free as information could be intercepted, corrupted, lost, >destroyed, arrive late or incomplete. > >To know more about Cordiant Technologies, please visit >http://www.cordiant.com > >_____________________________ > > >-----Original Message----- > From: Kent Boogaart [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 07, 2005 10:20 AM >To: user@struts.apache.org >Subject: Question re html:select on the client > > >Hello, > >I have an html:select populated from a collection. Alongside the select box >I have links to add, edit and delete items. I'm just wondering what the best >way is to handle passing the ID of the selected item to the edit and delete >actions. > >For example, if the user selects the option with value 12, I'd like to >forward to something like "/editAction?id=12". Is there some way to tell the >html:link tag to dynamically construct the querystring on the client? > >Thanks, >Kent > > >--------------------------------------------------------------------- >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] >