You will need to create a hidden field named "action", with a value of 
"Lookup":

<html:hidden property="action" value="Lookup"/>

My question to you is....why "Lookup"?  What does that have to do with your 
form?


Here's a sample:

<SCRIPT language="JavaScript">
function submitForm(form) {
 form.action.value="Lookup";
 form.submit();
 return true;
}
</SCRIPT>

<form name="frm" action="?" method="GET">
 <input type="hidden" name="action" value="">
 <select name="crn" onclick="submitForm(this.form)">
   <option value="Test" selected>Test</option>       
   <option value="Test2">Test2</option>       
 </select>
</form>


On Friday 11 July 2003 14:15, Shyam A wrote:
> Hi,
>
> I have an HTML form with Submit and Cancel buttons, and a drop down list,
> which when clicked submits the form. I use Javascript to submit the form
> when the dropdown list is clicked. I have a property called "action"
> defined in my ActionForm class that identifies the Submit and Cancel
> buttons in the HTML form. When the drop-down is clicked, I would like to
> set the value of this "action" property to "Lookup".
>
> My Javascript function is given below:
>
> ################
>
> <SCRIPT language="JavaScript">
> function submitForm(form)
> {
> form.action.value="Lookup";
> form.submit();
> return true;
> }
> #################
>
> and I invoke this function in my HTML form as shown below:
>
> #########################
>  <html:select property="crn" onclick="submitForm(this.form)">
>        <html:option value="Test" selected>Test</html:option>
>        </html:select>
> ###########################
>
> But, the value of the property "action" is not set to "Lookup".
>
> Any help would be greatly appreciated.
>
> Thanks,
> Shyam
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx



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

Reply via email to