Instead of using your form name, try this:

document.forms[0].item("RV").value

RV is the name of my input box.
document.forms[0] is the main form (in your case the struts form)

I wrote some Javascript that access struts form elements.

Imran
VisualBuilder.com
http://www.visualbuilder.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 November 2001 11:11
To: [EMAIL PROTECTED]
Subject: RE: Java script submit on select from drop down


Change it to something like this, where your_form_name is the name
attribute
you defined in your action mapping. Your notation doesn't work because
it's
trying to find a form that is a property of the select element.

<html:select property="organizationName"
onchange="document.your_form_name.submit()">
        <html:options collection="orgTypes" property="value" />

Lee

-----Original Message-----
From: Ravi Kharse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 1:44 AM
To: [EMAIL PROTECTED]
Subject: Java script submit on select from drop down



Hi,

I'm using struts select and options tag for creating a dropdown. I want
to 
submit the "form" on selecting from the dropdown.
I coded :

<html:select property="organizationName" onchange="this.form.submit()">
        <html:options collection="orgTypes" property="value" />

Can someone help me on this.

Thanks
Ravi


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

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

Reply via email to