?
Solved

Drop down

Posted on 2003-02-21
3
Medium Priority
?
229 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
[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
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

New style of hardware planning for Microsoft Exchange server.
The Summer 2017 Scholarship Winners have been announced!
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

741 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