Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Drop down

Posted on 2003-02-21
3
Medium Priority
?
231 Views
Last Modified: 2010-04-01
Okay I want to create a drop down list that is on a form and then when the user submits it the value gets sent to the page that updates the database. Here is what I have for the code so far. I reloaded my page but none of the values show up in the drop down. On the next page to retrieve the values do I just use a request.getParameter to get the value?

out.println("<select name='division'>");
          out.println("<option value='Senior'>");
          out.println("</option>");
          out.println("<option value='Midget'>");
          out.println("</option>");
          out.println("<option value='Bantam'>");
          out.println("</option>");
          out.println("</select>");
0
Comment
Question by:soda0091
  • 2
3 Comments
 

Accepted Solution

by:
pat5 earned 120 total points
ID: 7995796
If it is a single value than:

String division = request.getParameter("division");

If you want to get a multiple values than:

String[] division = request.getParameterValues("division");

correct me if i am wrong.
0
 

Author Comment

by:soda0091
ID: 7995851
Seems to work thanks
0
 

Author Comment

by:soda0091
ID: 7995853
seems to work thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Dropbox has a relatively new feature called Smart Sync.  This feature allows Dropbox Professional (not plus) and Dropbox Business (if enabled) users to store information in Dropbox WITHOUT storing any files on their computer.
How does storytelling impact the web? What goes into a great story on the web? And how can it be used for marketing purposes? All of these questions will be answered.
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

580 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