Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2007, 04:42 AM
Member
 
Join Date: Jul 2007
Posts: 9
mutuah is on a distinguished road
Getting values of an Option List
Hi all. I want to retrieve the value selected from the option list and i use the value, in the same jsp page, in the method down.

How do i get the this value selected? Any one to help me?


my code
<%
Statistics stat = new Statistics();
%>
<p>
Province <select name="province">
<option value ="Nairobi" selected>Nairobi</option>
<option value ="Central">Central</option>
<option value ="Central">Coast</option>
<option value ="Eastern">Eastern</option>
<option value ="North Eastern">North Eastern</option>
<option value ="Nyanza">Nyanza</option>
<option value ="Rift Valley">Rift Valley</option>
<option>Western</option>
</select>


</p>

<%
String province = OPTION.index;
ArrayList<DistrictObject> dist = stat.getDistricts(province);
for (int i=0; i<dist.size(); i++) {
%>
<p>
District <select name="district">
<option value = "<%=dist.get(i).getProvCode()%><%=dist.get(i).getD istCode()%>"> <%=dist.get(i).getDistName()%></option>
</select>
<% } %>
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing boolean Values of another values in one class. a_iyer20 Advanced Java 4 04-15-2008 02:04 PM
Menu on phone number option of a list Poonam CLDC and MIDP 7 01-31-2008 02:42 PM
the -eprof option? GVD Advanced Java 2 01-10-2008 02:48 PM
Is there a way to remove an option from optionsCollection? schu777 JavaServer Pages (JSP) and JSTL 0 08-02-2007 10:47 PM
problem with XERCES Parser using Option FieldType oregon New To Java 1 07-24-2007 02:44 AM


All times are GMT +3. The time now is 12:59 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org