Problem with zIndex

Results 1 to 2 of 2

Thread: Problem with zIndex

  1. #1
    Join Date
    Dec 1969

    Default Problem with zIndex

    I have an asp page which contains numerous drop down boxes which I draw out with this function.<BR><BR>Function DrawCombo(Name, s, e, val, title) <BR> <BR> Dim str<BR> <BR> str = str & "&#060;SELECT style=""zIndex:-1"" name=" & name<BR> str = str & " title=""" & Title & """&#062;"<BR> <BR> For x = s to e <BR> str = str & "&#060;OPTION value=" & x<BR> IF cInt(x) = cInt(val) THEN<BR> str = str & " selected"<BR> END IF<BR> str = str & " &#062;" & x & "&#060;/OPTION&#062;" <BR> Next<BR> str = str & "&#060;/SELECT&#062;"<BR> <BR> DrawCombo = str<BR> <BR> End Function<BR><BR>the problem is that when I hover over the controls I want to have a pop up box which contains text describing what the control does. This text is contained in a JS var which someone else will edit. Even though I set the zIndex of the popup box to 10 and the zIndex of the dropdowns to -1 when I display the pop up the dropdown boxes are always on top of the pop up.<BR>My code that calls the popup is.<BR><BR>&#060;input type=radio name=radRES value="STANDARD" onmouseover="show(top.standard)" &#062;<BR><BR>function show(txt){<BR><BR> var f = document.frmDialerConfig<BR> var popup = document.all.popupmenu<BR> = "#ffff66";<BR> = "1 solid black";<BR>"absolute"<BR> = mousex + 10;<BR> = mousey + 10 + document.body.scrollTop;<BR> document.all.divTxt.innerHTML = "&#060;font face=courier new size=2&#062;" + txt + "&#060;/font&#062;";<BR>"visible"; <BR> = -1;<BR> = 10;<BR> = 10;<BR> <BR>}<BR><BR>and my popup is defined just under the body tag as a table with a div in it.<BR><BR>&#060;div id="popupmenu" style="zIndex:10; visibility:hidden; position:absolute; left:100; top:300;"&#062;<BR> &#060;table style="cursor:pointer" width=200pt&#062;<BR> &#060;tr&#062;<BR> &#060;td align="center"&#062;&#060;div style="zIndex:10" id=divTxt&#062;&#060;/div&#062;&#060;/td&#062;<BR> &#060;/tr&#062;<BR> &#060;/table&#062;<BR>&#060;/div&#062;<BR><BR>As you can see everywhere I can I try to set the zIndex of the popup to 10 and the combo to -1.<BR>why do the combos keep appearing on top of the popup?? is it because I am drawing it out with asp?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem with zIndex

    Certain elements (ActiveX objects, combo boxes) always appear above other floating elements regardless of their zIndex.<BR><BR>The only thing you can do is "track" when a popup goes over these elements and hide them.<BR><BR>Also, please read the FAQ on crossposting.<BR><BR>Craig.

Posting Permissions

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