Bookmark Topic Watch Topic
  • New Topic

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

 
raj mal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!