Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-21
1
Medium Priority
?
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In this article, WatchGuard's Director of Security Strategy and Research Teri Radichel, takes a look at insider threats, the risk they can pose to your organization, and the best ways to defend against them.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

730 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