positioning scrollable SELECT window over selected item on form load

Discussion in 'HTML' started by Dave Petro, Nov 9, 2004.

  1. Dave Petro

    Dave Petro Guest

    I have a SELECT element on a form that has a size of ~20 and ~50
    options. The form is created dynamically on the server-side and
    remembers what the user last selected on the form(edit mode).
    The problem is when the form is refreshed and the user last
    selected an option near the bottom of the list. The option is still
    selected after refresh but it is not visible in the picklist window.

    Is there a way to tell the browser to scroll to the selected item?

    Dave
     
    Dave Petro, Nov 9, 2004
    #1
    1. Advertising

  2. Dave Petro

    brucie Guest

    In alt.html Dave Petro said:

    > Is there a way to tell the browser to scroll to the selected item?


    <option selected>blah</option>


    --
    the facts and opinions expressed by brucies
    l i t t l e v o i c e s
    are not necessarily the same as those held by brucie.
     
    brucie, Nov 9, 2004
    #2
    1. Advertising

  3. brucie enlightened us with:
    ><option selected>blah</option>


    <option selected="selected">blah</option>

    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
     
    Sybren Stuvel, Nov 9, 2004
    #3
  4. Dave Petro

    Dave Petro Guest

    It is not the selecting that is at issue. It is the positioning of the
    window over the selected item. That is a much harder problem.

    On Tue, 09
    Nov 2004 23:23:44 +0100, Sybren Stuvel wrote:

    > brucie enlightened us with:
    >><option selected>blah</option>

    >
    > <option selected="selected">blah</option>
    >
    > Sybren
     
    Dave Petro, Nov 9, 2004
    #4
  5. Dave Petro

    Mark Parnell Guest

    On Tue, 09 Nov 2004 13:44:03 -0800, Dave Petro <>
    declared in alt.html:

    > Is there a way to tell the browser to scroll to the selected item?


    Contact the browser manufacturer and ask them to change the browser's
    behaviour.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Nov 9, 2004
    #5
  6. Dave Petro enlightened us with:
    > It is not the selecting that is at issue. It is the positioning of the
    > window over the selected item. That is a much harder problem.


    Ah, ok. How about:

    <option id="someID" selected="selected">blah</option>

    and then send the browser to http://someserver/someurl#someID

    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
     
    Sybren Stuvel, Nov 10, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dennis Marks
    Replies:
    1
    Views:
    3,425
    Nikita the Spider
    Sep 8, 2006
  2. Iain
    Replies:
    3
    Views:
    969
  3. mldardy
    Replies:
    0
    Views:
    1,001
    mldardy
    Sep 28, 2010
  4. _andrea.l
    Replies:
    2
    Views:
    89
    _andrea.l
    Jun 25, 2005
  5. Dennis Marks

    Reset Selected Item in Select Option List

    Dennis Marks, Sep 8, 2006, in forum: Javascript
    Replies:
    0
    Views:
    135
    Dennis Marks
    Sep 8, 2006
Loading...

Share This Page