Solved

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

Posted on 2006-06-21
1
196 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
xjc and jaxb 2 88
tomcat users xml 7 100
servlet init param and contect param 3 53
build fail in maven project 11 170
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now