Solved

Retrieve value from <select> and pass to another <select>

Posted on 2006-06-21
1
198 Views
Last Modified: 2011-09-20
I would like to populate subsequent <select> tags based on user selections
<td>
<select id="cat" name="cat">
 <option value=""></option>
 <% for (int i=0;i<allcat.size();i++)
    {
      ecodes p = (ecode)allcat.get{i); %>
     <option value="<%=p.getcat()%><%=p.getcat()%></option>
    }
%>
</td>

<td>
<select id="area" name="area">
 <option value=""></option>
 <% for (int i=0;i<allcat.size();i++)
    { ArrayList allarea = cs.selectArea(SELECTED value from "cat");
    ...

?? I would like to pass the selected value from "cat". Can I do this? ??
     
    }
%>
</td>
Thanks,


0
Comment
Question by:franco32
1 Comment
 
LVL 3

Accepted Solution

by:
runa_paathak earned 125 total points
ID: 16957295
No you cannot. This part of your code

 <% for (int i=0;i<allcat.size();i++)
    { ArrayList allarea = cs.selectArea(SELECTED value from "cat");

is JSP code on the server-side. And selection from the first select will happen on the client-side when the user selects it. This will be available to the server only when the user submits the form.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question