Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-21
1
Medium Priority
?
206 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 250 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

927 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