Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    selected option problem

    Hi!
    I have a drop down menu created with a select tag and i have the following values in it:
    1. "All", for selecting alltogether the values (for query purposes)
    2. The rest of the values which come with a query from a database.

    Each time I enter the page I want to have selected as a first option, the previous selection and if there is no previous selection (firts time into the page or never used the menu before), I want pre-selected the "All" option.
    The code up to now -without using the "selected" attribute- looks like this:

    <form action="###" method="post">
    <select>
    <option value="0">All</option>
    <c:forEach var="row" intems=.......>
    <option value="row.value">row.name</option>
    </c:ForEach>
    </select>
    </form>

    I am close to the answer with a script, but i am not at all good using them!

    I would appreciate any help.

  • #2
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    never mind, i got it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •