Mark Galbreath wrote:
If you read the API you will see that JavaScript functions are built into the Struts <html:select> tag:
http://jakarta.apache.org/struts/userGuide/struts-html.html#select
so you have several event handlers to use for transferring control. E.g., <html:select property="myBean" onClick="myFunction( 'myBean' )"/></html:select>
<script type="text/javascript> function myFunction( docObject ) { var string = "document.forms[ 0 ].elements[ '" + docObject + "' ].value"; var selected = string; location = "/search.do?action=" + docObject + "&selectedItem=" + string; } </script>
And map an action path for "search.do" in your struts-config.xml file.
Mark
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 7:37 AM
I would like to do the following : I have a form with different fields and drop down boxes When A drop down box is selectd I would like to do a submit that looks more or less like this :
submit=/search.do?action=dropdownbox1&selectedItem=item
--------------------------------------------------------------------- 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]