aspose file tools
The moose likes JSP and the fly likes select another dropdown based on a selection from first dropdown in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

select another dropdown based on a selection from first dropdown in jsp

raj mal
Greenhorn

Joined: Feb 11, 2011
Posts: 11
I have the below dropdowns. I need to select the second dropdown (email) when the user select an entry in first dropdown (accounts). if accountid2 is selected, email-id2 must be selected. if other, other should be selected. how to do that using onchange fuction. please note that it uses struts tag - <html:select>

<td>1. Member Account Number<span class="bodyCopy"><font color="#ff0000"> * </font></span>:
<html:select name="DataForm" property="accountNumber" styleClass="formContent"
style="width:80px" >

<option>${reDataForm.accountNumber}</option>

<htmlptions collection="<%= WorkConstants.RENewDropdowns.PACCT %>" property="value" labelProperty="label" styleClass="formContent"/>
</html:select>

<td>3. Member <br>E-mail Address:<br /> <span class="bodyCopy" ></span>
<html:select name="DataForm" property="emailAddress" style = "width:150px" styleClass="formContent">
<option>${reDataForm.emailAddress}</option>
<htmlptions collection="<%= WorkConstants.RENewDropdowns.PEMAIL %>" property="value" labelProperty="label" styleClass="formContent"/>
</html:select>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56229
    
  13

Please do not post the same question more than once.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: select another dropdown based on a selection from first dropdown in jsp
 
Similar Threads
html:options usage
problem on html:select html:options
How to change color in the options using html:options
select another dropdown based on a selection from first dropdown using <html:select> struts tag
text box displays when user select “Other” how to assign the value and retain the value when refresh