Advice needed on Select Box option display...

Discussion in 'Javascript' started by June Moore, Feb 9, 2005.

  1. June Moore

    June Moore Guest

    Hi,
    I have a select box that has a fixed width. The fixed width is used to
    ensure that the select box does not appear distorted on the form.

    When the user selects an option, how do I show a tip for any titles
    that are longer than the width of the select box, e.g. "Harry Potter
    and the Prisoner of Azkaban"? If this is not possible, can anyone here
    suggest ways that can make the longer titles visible to the user when
    the select box is opened?

    <select size="1" name="title_select" style="width=170px">
    <option value="">Please select a film title</option>
    <option value="A1">Ray</option>
    <option value="A2">Harry Potter and the Prisoner of
    Azkaban</option>
    <option value="A3">The Aviator</option>
    <option value="A4">Harry Potter and the Chamber of
    Secrets</option>
    <option value="A5">Eternal Sunshine of the Spotless Mind</option>
    </select>

    Thanks,
    June.
     
    June Moore, Feb 9, 2005
    #1
    1. Advertising

  2. June Moore

    Spats30 Guest

    You could do a fake wrap of your optioins.

    First put a seperator option between every title:

    <option value="">-----------------------</option>

    then just split your long descriptions onto two or more lines.

    <option value="A2">Harry Potter and the</option>

    <option value="A2">Prisoner of Azkaban</option>

    <option value="">-----------------------</option>



    That's one way to try it.
     
    Spats30, Feb 9, 2005
    #2
    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. Oskar Wild
    Replies:
    2
    Views:
    178
    Oskar Wild
    Aug 28, 2003
  2. palmiere
    Replies:
    1
    Views:
    434
    Erwin Moller
    Feb 9, 2004
  3. mr_burns

    JS to select an option in a combo box

    mr_burns, Apr 2, 2004, in forum: Javascript
    Replies:
    4
    Views:
    88
    Frostillicus
    Apr 4, 2004
  4. Ilpo
    Replies:
    2
    Views:
    113
  5. rvelosoo
    Replies:
    1
    Views:
    369
    Bart Van der Donck
    Aug 13, 2008
Loading...

Share This Page