Solved

doPost and select menu's

Posted on 2004-10-26
227 Views
Last Modified: 2013-11-24
I have a java servlet that i post a form to. On the form, I have a select menu (non-multiple).

How do i access all of the options that are in that select menu? The request object only contains the currently selected option.

Any help/suggestions/comments would be greatly appreciated.

Regards,

-MW
0
Question by:michaelmwilson1
    4 Comments
     
    LVL 8

    Accepted Solution

    by:
    you need to use javascript to append all the options to the URL(if you dont want to store the options in the session or in a bean). The browser always sends only the selected options.
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    >>How do i access all of the options that are in that select menu?

    Why would you want to if only one is selected?
    0
     
    LVL 92

    Assisted Solution

    by:objects
    > How do i access all of the options that are in that select menu?

    You cannot access them from the request, but as you created the menu in the first place you should already know them.
    If you are using JSP, you could store the menu options in your session when you create it.
    0
     
    LVL 8

    Expert Comment

    by:kiranhk
    did you find any of the suggestions useful?? havent heard from you for a long time
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    846 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

    12 Experts available now in Live!

    Get 1:1 Help Now