SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Paris
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple selection is not selected

    hello

    I ahev a small problem thta doesnt concern directly javascript but might be resolved with.

    I have multiple slection list with an option selected by default


    here s the code

    HTML Code:
    <select id="tt"  multiple>
    <option id="">sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option id="mm" selected="selected" value="sejldf">sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    <option>sdl;fks;</option>
    </select>
    When the page is executed the option is well selected but the scroll list is still up so the option is not seen.

    Is that possible to resol;ve it only vi ahtml or is necessary to develope a javascript?

    thanks to all

  2. #2
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what do you mean by this, any link or screenshoot?

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Paris
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pic1 instead of Pic2 (see attach)
    Attached Images Attached Images

  4. #4
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try change multiple to multiple="multiple"

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Paris
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doesn t work

  6. #6
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I assume you have a size on that multi-select dropdown? And that you mean that the selected element is not visible because of that?

    Firefox will scroll the selected item into view. IE will not.

  7. #7
    SitePoint Zealot
    Join Date
    Jun 2004
    Location
    Paris
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Pepejeria,

    That s exactly what i mean! The question is how to make IE work properly?

  8. #8
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to change the dropdowns scrollTop property. This does sadly not work in IE (works in Firefox)...

  9. #9
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That fixed scrollTop on <select>s in IE7, but yeah, it doesn't work in IE6.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

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