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 7 of 7
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question floating layer above the <select> box?

    I'm having a problem with layers and drop down menus (<select>).

    When I have a <select> box on my page and a moveable layer the <select> box always appears over the top of the layer.
    setting the 'z-index' to the layer is not working

    I need the floating layer to appear above the <select> box.

    NS 7 is OK the problem is IE 6

    FYI its my first problem with IE normally its always NS

    Tx

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmmm there was a thread discussing this before with some intresting links, problem is i dont know what to search for to find it.
    i think (yes ME think) that the form element will always be on top ....

  • #3
    New Coder
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, as far as I know you can't do anything about it. The problem is that the Select box is a seperate window in IE and not an actual HTML rendered element.

    One thing I've done in the past was to use a text box instead which is rendered as an HTML element in the newer versions of IE and then put an invisible select over the top. Then when you click the text box your make the select visible and drop it down. Once a selection is made you copy the content of the select to the text box and you hide the select again. It's dirty but I believe I got it working...

    If anyone does know a decent solution for it, I'd dearly like to know.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The only solution that I've found to be effective is to hide/move the select when needed.

    <form>
    <div id="selex" style="position:relative: left:0;">
    <select ...............>
    </div>

    movey layer code.
    if(layer_is_moving) {
    doc.getelbyid('selex').style.left = -9900px;
    }
    else {
    doc.getelbyid('selex').style.left = 0;
    }

    sort of thing. note: too lazy to type getElementById in its entirety - shown code was just to impart the concept.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how do you get a layer to appear over a drop menu?

    here's a thread on the same subject - although the only solution was to hide the box like Ökii suggested....
    redhead

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    window.createPopop() should be able to create a widget which can hover above it. IE5.5+ only though.

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should also find that iframes will as they are completely different documents.

    You might get away with just using one of them as a draggable layer. Not very NS4 friendly which to some viewpoints might be a good thing
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.


  •  

    Posting Permissions

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