Solved

Dropdown Menu goes behind input box

Posted on 2003-12-05
10
1,736 Views
Last Modified: 2007-12-19
My dropdown menu "drops-down" behind form elements that have been created with javascript.  I don't know JavaScript myself.

How can this be fixed?

Thanks,
Hank
------------------------------------------------------------------------------------------------------------
<html><head>
<style>
.ivorybodytable      {
      font-family: luxi sans, verdana, geneva, arial, helvetica, sans-serif;
      font-size: 12px;
      background-color: #cfcfc8;
}

.darkbordertablemain      {
      background-color: #660000;
      margin-top: 0px;
      margin-bottom: -1px;
}

.darkbordertable      {
      background-color: #660000;
      margin-top: 11px;
      margin-bottom: 1px;
}

</style>

<script language="JavaScript" type="text/javascript">
<!--
//
DOM = (document.getElementById) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
Konqueror = (navigator.userAgent.indexOf("Konqueror") > -1) ? 1 : 0;
Konqueror22 = (navigator.userAgent.indexOf("Konqueror 2.2") > -1 || navigator.userAgent.indexOf("Konqueror/2.2") > -1) ? 1 : 0;
Opera = (navigator.userAgent.indexOf("Opera") > -1) ? 1 : 0;
Opera5 = (navigator.userAgent.indexOf("Opera 5") > -1 || navigator.userAgent.indexOf("Opera/5") > -1) ? 1 : 0;
Opera6 = (navigator.userAgent.indexOf("Opera 6") > -1 || navigator.userAgent.indexOf("Opera/6") > -1) ? 1 : 0;
Opera56 = Opera5 || Opera6;
IE = (navigator.userAgent.indexOf("MSIE") > -1) ? 1 : 0;
IE = IE && !Opera;
IE5 = IE && DOM;
IE4 = (document.all) ? 1 : 0;
IE4 = IE4 && IE && !DOM;
// -->
</script>
<script language="JavaScript" type="text/javascript">
//

layerLeft = new Array();
layerTop = new Array();

function setVisibility(layer,on) {
      if (on) {
            if (DOM) {
                  document.getElementById(layer).style.visibility = "visible";
            } else if (NS4) {
                  document.layers[layer].visibility = "show";
            } else {
                  document.all[layer].style.visibility = "visible";
            }
      } else {
            if (DOM) {
                  document.getElementById(layer).style.visibility = "hidden";
            } else if (NS4) {
                  document.layers[layer].visibility = "hide";
            } else {
                  document.all[layer].style.visibility = "hidden";
            }
      }
}

function isVisible(layer) {
      if (DOM) {
            return (document.getElementById(layer).style.visibility == "visible");
      } else if (NS4) {
            return (document.layers[layer].visibility == "show");
      } else {
            return (document.all[layer].style.visibility == "visible");
      }
}

function setLeft(layer,x) {
layerLeft[layer] = x;
      if (DOM && !Opera5) {
            document.getElementById(layer).style.left = x + "px";
      } else if (Opera5) {
            document.getElementById(layer).style.left = x;
      } else if (NS4) {
            document.layers[layer].left = x;
      } else {
            document.all[layer].style.pixelLeft = x;
      }
}

function getOffsetLeft(layer) {
      var value = 0;
      if (DOM) {      // Mozilla, Konqueror >= 2.2, Opera >= 5, IE
            object = document.getElementById(layer);
            value = object.offsetLeft;
//alert (object.tagName + " --- " + object.offsetLeft);
            while (object.tagName != "BODY" && object.offsetParent) {
                  object = object.offsetParent;
//alert (object.tagName + " --- " + object.offsetLeft);
                  value += object.offsetLeft;
            }
      } else if (NS4) {
            value = document.layers[layer].pageX;
      } else {      // IE4 IS SIMPLY A BASTARD !!!
            if (document.all["IE4" + layer]) {
                  layer = "IE4" + layer;
            }
            object = document.all[layer];
            value = object.offsetLeft;
            while (object.tagName != "BODY") {
                  object = object.offsetParent;
                  value += object.offsetLeft;
            }
      }
      return (value);
}

function setTop(layer,y) {
layerTop[layer] = y;
      if (DOM && !Opera5) {
            document.getElementById(layer).style.top = y + "px";
      } else if (Opera5) {
            document.getElementById(layer).style.top = y;
      } else if (NS4) {
            document.layers[layer].top = y;
      } else {
            document.all[layer].style.pixelTop = y;
      }
}

function getOffsetTop(layer) {
// IE 5.5 and 6.0 behaviour with this function is really strange:
// in some cases, they return a really too large value...
// ... after all, IE is buggy, nothing new
      var value = 0;
      if (DOM) {
            object = document.getElementById(layer);
            value = object.offsetTop;
            while (object.tagName != "BODY" && object.offsetParent) {
                  object = object.offsetParent;
                  value += object.offsetTop;
            }
      } else if (NS4) {
            value = document.layers[layer].pageY;
      } else {      // IE4 IS SIMPLY A BASTARD !!!
            if (document.all["IE4" + layer]) {
                  layer = "IE4" + layer;
            }
            object = document.all[layer];
            value = object.offsetTop;
            while (object.tagName != "BODY") {
                  object = object.offsetParent;
                  value += object.offsetTop;
            }
      }
      return (value);
}

function setWidth(layer,w) {
      if (DOM) {
            document.getElementById(layer).style.width = w;
      } else if (NS4) {
//            document.layers[layer].width = w;
      } else {
            document.all[layer].style.pixelWidth = w;
      }
}

function getOffsetWidth(layer) {
      var value = 0;
      if (DOM && !Opera56) {
            value = document.getElementById(layer).offsetWidth;
      } else if (NS4) {
            value = document.layers[layer].document.width;
      } else if (Opera56) {
            value = document.getElementById(layer).style.pixelWidth;
      } else {      // IE4 IS SIMPLY A BASTARD !!!
            if (document.all["IE4" + layer]) {
                  layer = "IE4" + layer;
            }
            value = document.all[layer].offsetWidth;
      }
      return (value);
}

function setHeight(layer,h) {      // unused, not tested
      if (DOM) {
            document.getElementById(layer).style.height = h;
      } else if (NS4) {
//            document.layers[layer].height = h;
      } else {
            document.all[layer].style.pixelHeight = h;
      }
}

function getOffsetHeight(layer) {
      var value = 0;
      if (DOM && !Opera56) {
            value = document.getElementById(layer).offsetHeight;
      } else if (NS4) {
            value = document.layers[layer].document.height;
      } else if (Opera56) {
            value = document.getElementById(layer).style.pixelHeight;
      } else {      // IE4 IS SIMPLY A BASTARD !!!
            if (document.all["IE4" + layer]) {
                  layer = "IE4" + layer;
            }
            value = document.all[layer].offsetHeight;
      }
      return (value);
}

function getWindowWidth() {
      var value = 0;
      if ((DOM && !IE) || NS4 || Konqueror || Opera) {
            value = top.innerWidth;
//      } else if (NS4) {
//            value = document.width;
      } else {      // IE
            if (document.documentElement && document.documentElement.clientWidth) {
                  value = document.documentElement.clientWidth;
            } else if (document.body) {
                  value = document.body.clientWidth;
            }
      }
      if (isNaN(value)) {
            value = top.innerWidth;
      }
      return (value);
}

function getWindowXOffset() {
      var value = 0;
      if ((DOM && !IE) || NS4 || Konqueror || Opera) {
            value = window.pageXOffset;
      } else {      // IE
            if (document.documentElement && document.documentElement.scrollLeft) {
                  value = document.documentElement.scrollLeft;
            } else if (document.body) {
                  value = document.body.scrollLeft;
            }
      }
      return (value);
}

function getWindowHeight() {
      var value = 0;
      if ((DOM && !IE) || NS4 || Konqueror || Opera) {
            value = top.innerHeight;
      } else {      // IE
            if (document.documentElement && document.documentElement.clientHeight) {
                  value = document.documentElement.clientHeight;
            } else if (document.body) {
                  value = document.body.clientHeight;
            }
      }
      if (isNaN(value)) {
            value = top.innerHeight;
      }
      return (value);
}

function getWindowYOffset() {
      var value = 0;
      if ((DOM && !IE) || NS4 || Konqueror || Opera) {
            value = window.pageYOffset;
      } else {      // IE
            if (document.documentElement && document.documentElement.scrollTop) {
                  value = document.documentElement.scrollTop;
            } else if (document.body) {
                  value = document.body.scrollTop;
            }
      }
      return (value);
}
</script>
<script language="JavaScript" type="text/javascript">
//

useTimeouts = 1;
timeoutLength = 1000;      // time in ms; not significant if useTimeouts = 0;
shutdownOnClick = 0;

loaded = 0;
layersMoved = 0;
layerPoppedUp = "";

timeoutFlag = 0;
if (Opera56 || IE4) {
      useTimeouts = 0;
}
if (NS4 || Opera56 || IE4) {
      shutdownOnClick = 1;
}

currentY = 0;
function grabMouse(e) {      // for NS4
      currentY = e.pageY;
}
if (NS4) {
      document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
      document.onmousemove = grabMouse;
}

function seeThroughElements(show) {
      if (show) {
            foobar = "visible";
      } else {
            foobar = "hidden";
      }
      for (i=0; i<toBeHidden.length; i++) {
            toBeHidden[i].style.visibility = foobar;
      }
}

function shutdown() {
      for (i=0; i<numl; i++) {
            LMPopUpL(listl[i], false);
      }
      layerPoppedUp = "";
      if (Konqueror || IE5) {
            seeThroughElements(true);
      }
}
if (shutdownOnClick) {
      if (NS4) {
            document.onmousedown = shutdown;
      } else {
            document.onclick = shutdown;
      }
}

function setLMTO() {
      if (useTimeouts) {
            timeoutFlag = setTimeout('shutdown()', timeoutLength);
      }
}

function clearLMTO() {
      if (useTimeouts) {
            clearTimeout(timeoutFlag);
      }
}

function moveLayerX(menuName) {
      if (!loaded || (isVisible(menuName) && menuName != layerPoppedUp)) {
            return;
      }
      if (father[menuName] != "") {
            if (!Opera5 && !IE4) {
                  width0 = lwidth[father[menuName]];
                  width1 = lwidth[menuName];
            } else if (Opera5) {
                  // Opera 5 stupidly and exaggeratedly overestimates layers widths
                  // hence we consider a default value equal to $abscissaStep
                  width0 = abscissaStep;
                  width1 = abscissaStep;
            } else if (IE4) {
                  width0 = getOffsetWidth(father[menuName]);
                  width1 = getOffsetWidth(menuName);
            }
            onLeft = getOffsetLeft(father[menuName]) - width1 + menuLeftShift;
            onRight = getOffsetLeft(father[menuName]) + width0 - menuRightShift;
            windowWidth = getWindowWidth();
            windowXOffset = getWindowXOffset();
//            if (NS4 && !DOM) {
//                  windowXOffset = 0;
//            }
            if (onLeft < windowXOffset && onRight + width1 > windowWidth + windowXOffset) {
                  if (onRight + width1 - windowWidth - windowXOffset > windowXOffset - onLeft) {
                        onLeft = windowXOffset;
                  } else {
                        onRight = windowWidth + windowXOffset - width1;
                  }
            }
            if (back[father[menuName]]) {
                  if (onLeft < windowXOffset) {
                        back[menuName] = 0;
                  } else {
                        back[menuName] = 1;
                  }
            } else {
//alert(onRight + " - " + width1 + " - " +  windowWidth + " - " + windowXOffset);
                  if (onRight + width1 > windowWidth + windowXOffset) {
                        back[menuName] = 1;
                  } else {
                        back[menuName] = 0;
                  }
            }
            if (back[menuName]) {
                  setLeft(menuName, onLeft);
            } else {
                  setLeft(menuName, onRight);
            }
      }
      moveLayerY(menuName);      // workaround needed for Mozilla < 1.4 for MS Windows
}

function moveLayerY(menuName) {
      if (!loaded || (isVisible(menuName) && menuName != layerPoppedUp)) {
            return;
      }
      if (!layersMoved) {
            moveLayers();
            layersMoved = 1;
      }
      if (!NS4) {
            newY = getOffsetTop("ref" + menuName);
      } else {
            newY = currentY;
      }
      newY += menuTopShift;
      layerHeight = getOffsetHeight(menuName);
      windowHeight = getWindowHeight();
      windowYOffset = getWindowYOffset();
      if (newY + layerHeight > windowHeight + windowYOffset) {
            if (layerHeight > windowHeight) {
                  newY = windowYOffset;
            } else {
                  newY = windowHeight + windowYOffset - layerHeight;
            }
      }
      if (Math.abs(getOffsetTop(menuName) - newY) > thresholdY) {
            setTop(menuName, newY);
      }
}

function moveLayerX1(menuName, father) {
      if (!lwidthDetected) {
            return;
      }
      if (!Opera5 && !IE4) {
            width1 = lwidth[menuName];
      } else if (Opera5) {
            // Opera 5 stupidly and exaggeratedly overestimates layers widths
            // hence we consider a default value equal to $abscissaStep
            width1 = abscissaStep;
      }
      foobar = getOffsetLeft(father + menuName);
if (!IE4) {
      windowWidth = getWindowWidth();
      windowXOffset = getWindowXOffset();
      if (foobar + width1 > windowWidth + windowXOffset) {
            foobar = windowWidth + windowXOffset - width1;
      }
      if (foobar < windowXOffset) {
            foobar = windowXOffset;
      }
}
      setLeft(menuName, foobar);
}

function layersOverlap(layer, i) {
      if (Konqueror22) {
            return true;
      }

//      xa1 = getOffsetLeft(layer);
//setLeft(layer, xa1);
      xa1 = layerLeft[layer];
      xa2 = xa1 + getOffsetWidth(layer);
//setWidth(layer, xa2-xa1);
//      ya1 = getOffsetTop(layer);
//setTop(layer, ya1);
      ya1 = layerTop[layer];
      ya2 = ya1 + getOffsetHeight(layer);
//setHeight(layer, ya2-ya1);
//alert(":" + xa1 + ":" + xa2 + ":" + ya1 + ":" + ya2 + ":");

      xb1 = toBeHiddenLeft[i];
      xb2 = xb1 + toBeHidden[i].offsetWidth;
      yb1 = toBeHiddenTop[i];
      yb2 = yb1 + toBeHidden[i].offsetHeight;
//alert(":" + xb1 + ":" + xb2 + ":" + yb1 + ":" + yb2 + ":");

      if(xb1>xa1) xa1=xb1; if(xb2<xa2) xa2=xb2;
      if(yb1>ya1) ya1=yb1; if(yb2<ya2) ya2=yb2;

      return (xa2>xa1 && ya2>ya1);
}

function seeThroughWorkaround(menuName, on) {
      for (i=0; i<toBeHidden.length; i++) {
            if (layersOverlap(menuName, i)) {
                  if (on) {
                        toBeHidden[i].style.visibility = "hidden";
                  } else {
                        toBeHidden[i].style.visibility = "visible";
                  }
            }
      }
}

function LMPopUpL(menuName, on) {
      if (!loaded) {
            return;
      }
      if (!layersMoved) {
            moveLayers();
            layersMoved = 1;
      }
      setVisibility(menuName, on);
}

function LMPopUp(menuName, isCurrent) {
      if (!loaded || menuName == layerPoppedUp || (isVisible(menuName) && !isCurrent)) {
            return;
      }
      if (menuName == father[layerPoppedUp]) {
            LMPopUpL(layerPoppedUp, false);
//            seeThroughWorkaround(menuName, false);
      } else if (father[menuName] == layerPoppedUp) {
            LMPopUpL(menuName, true);
            seeThroughWorkaround(menuName, true);
      } else {
            shutdown();
            foobar = menuName;
            do {
                  LMPopUpL(foobar, true);
                  seeThroughWorkaround(foobar, true);
                  foobar = father[foobar];
            } while (foobar != "")
      }
/*
      if (layerPoppedUp == "") {
            seeThroughElements(false);
      }
*/
      layerPoppedUp = menuName;
}

function resizeHandler() {
      if (NS4) {
            window.location.reload();
      }
      shutdown();
      for (i=0; i<numl; i++) {
            setLeft(listl[i], 0);
            setTop(listl[i], 0);
      }
//      moveLayers();
      layersMoved = 0;
}
window.onresize = resizeHandler;

function yaresizeHandler() {
      if (window.innerWidth != origWidth || window.innerHeight != origHeight) {
            if (Konqueror22 || Opera5) {
                  window.location.reload();      // Opera 5 often fails this
            }
            origWidth  = window.innerWidth;
            origHeight = window.innerHeight;
            resizeHandler();
      }
      setTimeout('yaresizeHandler()', 500);
}
function loadHandler() {
      if (Konqueror22 || Opera56) {
            origWidth  = window.innerWidth;
            origHeight = window.innerHeight;
            yaresizeHandler();
      }
}
window.onload = loadHandler;

function fixieflm(menuName) {
      if (DOM) {
            setWidth(menuName, "100%");
      } else {      // IE4 IS SIMPLY A BASTARD !!!
            document.write("</div>");
            document.write("<div id=\"IE4" + menuName + "\" style=\"position: relative; width: 100%; visibility: visible;\">");
      }
}

</script>
<script language="JavaScript" type="text/javascript">
<!--
menuTopShift = -12;
menuRightShift = 10;
menuLeftShift = 6;

var thresholdY = 5;
var abscissaStep = 140;

toBeHidden = new Array();
toBeHiddenLeft = new Array();
toBeHiddenTop = new Array();

listl = ['L2','L17'];
var numl = listl.length;

father = new Array();
for (i=1; i<=21; i++) {
      father["L" + i] = "";
}
father_keys = ['L3','L4','L5','L6','L7','L8','L9','L10','L11','L12','L13','L14','L15','L16','L18','L19','L20','L21'];
father_vals = ['L2','L2','L2','L2','L2','L2','L2','L2','L2','L2','L2','L2','L2','L2','L17','L17','L17','L17'];
for (i=0; i<father_keys.length; i++) {
      father[father_keys[i]] = father_vals[i];
}

lwidth = new Array();
var lwidthDetected = 0;

function moveLayers() {
      if (!lwidthDetected) {
            for (i=0; i<numl; i++) {
                  lwidth[listl[i]] = getOffsetWidth(listl[i]);
            }
            lwidthDetected = 1;
      }
      if (IE4) {
            for (i=0; i<numl; i++) {
                  setWidth(listl[i], abscissaStep);
            }
      }
      var hormenu1TOP = getOffsetTop('hormenu1L1');
      var hormenu1HEIGHT = getOffsetHeight('hormenu1L1');
      setTop('L2', hormenu1TOP + hormenu1HEIGHT);
      moveLayerX1('L2', 'hormenu1');
      setTop('L17', hormenu1TOP + hormenu1HEIGHT);
      moveLayerX1('L17', 'hormenu1');

}

back = new Array();
for (i=1; i<=21; i++) {
      back["L" + i] = 0;
}

// -->
</script>
<script language="JavaScript">
//
var copyright=""

var changemode="This function is only available in layout mode.\nDo you want to change mode?";
var btns = [
["ilink","Insert the selected link","Insert the selected hyperlink from selectbox"],
[""],
["iimage","Insert the selected image","Insert the selected hyperlink from selectbox"],
]
var iimage=[["images/picture1.jpg","picture1.jpg"],["picture2.jpg","picture2.jpg"]]; var ilink=[["http://www.google.com","Google"],["http://www.yahoo.com","Yahoo"],["http://www.av.com","AV"]];
function getimage(image){return ""}

function cmd(c){if(c=="save"){if(format=="HTML"){document.getElementById("text").value=document.getElementById("f").contentWindow.document.body.innerHTML;document.getElementById("t").submit()}

else if(confirm(changemode))chmode()}else if(c=="selectall")document.getElementById("f").contentWindow.document.execCommand(c,false,null);else if(c=="html")chmode();
else if (c=="color") {document.getElementById("f").contentWindow.document.execCommand('foreColor', true, showModalDialog('colorpicker.html','','dialogHeight:275px;dialogWidth:350px'));}
else{if(format=="HTML"||(c=="cut"||c=="copy"||c=="paste"||c=="undo"||c=="redo")){var tmp=null;if(c=="iimage"){tmp=document.forms[c].iimage.value;c="insertimage"}if(c=="ilink"){tmp=document.forms[c].ilink.value;c="createlink"}if((c.search(/h[1-4]/)!=-1)||c=="p"){tmp="<"+c+">"; c="formatblock"}document.getElementById("f").contentWindow.focus();if (tmp==null && c=="createlink"){if(isNav) { tmp=prompt("Enter URL:", "");document.getElementById("f").contentWindow.document.execCommand("CreateLink",false,tmp)}else document.getElementById("f").contentWindow.document.selection.createRange().execCommand(c,true,tmp)} else if (c=="cut"||c=="copy"||c=="paste") document.getElementById("f").contentWindow.document.selection.createRange().execCommand(c,false,null); else document.getElementById("f").contentWindow.document.execCommand(c,false,tmp);document.getElementById("f").contentWindow.focus();}}}
function tables(){for(var i=0;i<btns.length;i++){if(btns[i][0]=="ilink")sb(i,ilink);if(btns[i][0]=="iimage")sb(i,iimage);if(btns[i][0]=="tr")document.write("</td></tr></table></td></tr><tr><td class=\"edit\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"edit\">");else{if(btns[i][0]!="")document.write("<img src=\""+getimage(btns[i][0])+"\" id=\""+btns[i][0]+"\" alt=\""+btns[i][1]+"\" title=\""+btns[i][1]+"\" onclick=\"cmd('"+btns[i][0]+"')\" width=\"23\" height=\"22\" style=\"border:outset 1px;\" onmouseover=\"this.style.border='inset 1px';window.status='"+btns[i][2]+"'\" onmouseout=\"this.style.border='outset 1px';window.status='"+copyright+"'\">");else document.write("<img src=\""+getimage(btns[i][0])+"\" alt=\"\" width=\"3\" height=\"22\">")}}}
function sb(i,tmp){document.write("</td><td class=\"edit\"><form id=\""+btns[i][0]+"\" style=\"margin:0\"><select id=\""+btns[i][0]+"\" class=\"edit\">");for(var j=0;j<tmp.length;j++)document.write("<option value=\""+ tmp[j][0]+"\">"+tmp[j][1]+"</option>");document.write("</select></form></td><td class=\"edit\">")}
function bloker(){return false}document.ondragstart=bloker;img1=new Image();img1.src=getimage("html");img2=new Image();img2.src=getimage("layout");
</script></head>

<body>
<table border="0" cellpadding="0" cellspacing="0" class="darkbordertablemain" >
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1">
<tr valign="baseline">
<td class="ivorybodytable" align="center">
<div id="hormenu1L1" style="position: relative; visibility: visible;" onmouseover="clearLMTO();" onmouseout="setLMTO();">
<script language="JavaScript" type="text/javascript">
<!--
if (IE) fixieflm("hormenu1L1");
// -->
</script>
<a href="/pcc9/" onmouseover="shutdown();"
class="phplmold">This&nbsp;&#133;</a></div>
</td>
<td class="ivorybodytable" align="center">
<div id="hormenu1L2" style="position: relative; visibility: visible;" onmouseover="clearLMTO();" onmouseout="setLMTO();">
<script language="JavaScript" type="text/javascript">
<!--
if (IE) fixieflm("hormenu1L2");
// -->
</script>
<a href="/pcc9/site/edit.phpProject_Launch.html" onmouseover="moveLayerX1('L2', 'hormenu1') ; LMPopUp('L2', false);"
class="phplmold">Project La&#133;</a>&nbsp;<img
src="images/down-arrow.png" width="9" height="5"
border="0" alt=">>" /></div>
</td>
<td class="ivorybodytable" align="center">
<div id="hormenu1L17" style="position: relative; visibility: visible;" onmouseover="clearLMTO();" onmouseout="setLMTO();">
<script language="JavaScript" type="text/javascript">
<!--
if (IE) fixieflm("hormenu1L17");
// -->
</script>
<a href="/pcc9/site/edit.phpWhat-27s_Working.html" onmouseover="moveLayerX1('L17', 'hormenu1') ; LMPopUp('L17', false);"
class="phplmold">What's Wor&#133;</a>&nbsp;<img
src="images/down-arrow.png" width="9" height="5"
border="0" alt=">>" /></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=1><tr><td>
<script language="JavaScript">tables();</script>
</td></tr></table>

<div id="L2" style="position: absolute; left: 0; top: 0; visibility: hidden;" onmouseover="clearLMTO();" onmouseout="setLMTO();">
<div align=left class=sub_menu_position><table border="0" cellpadding="1" cellspacing="0" class="darkbordertable">
<tr>
<td>
<table border="0" cellpadding="5" cellspacing="0" class="ivorybodytable" width="140">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="ivorybodytable" colspan="2" nowrap="nowrap">
</td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgfsdg.html" id="refL3" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/sdfgdfsgfsdg.html" id="refL4" onmouseover="LMPopUp('L2', true);"
class="phplmold">sdfgdfsgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgsdfgdfsg.html" id="refL5" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgsdfgdfsg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgfsdg.html" id="refL6" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/sdfgdfsgfsdg.html" id="refL7" onmouseover="LMPopUp('L2', true);"
class="phplmold">sdfgdfsgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgsdfgdfsg.html" id="refL8" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgsdfgdfsg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgfsdg.html" id="refL9" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/sdfgdfsgfsdg.html" id="refL10" onmouseover="LMPopUp('L2', true);"
class="phplmold">sdfgdfsgfsdg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/dfsgsdfgsdfgdfsg.html" id="refL11" onmouseover="LMPopUp('L2', true);"
class="phplmold">dfsgsdfgsdfgdfsg</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/z.com.html" id="refL12" onmouseover="LMPopUp('L2', true);"
class="phplmold">z.com</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/River_C-40P_Site.html" id="refL13" onmouseover="LMPopUp('L2', true);"
class="phplmold">River C@P Site</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/_Landing_First_Nation_C-40P_Site.html" id="refL14" onmouseover="LMPopUp('L2', true);"
class="phplmold">Landing First&#133;</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/Woodcrafts.html" id="refL15" onmouseover="LMPopUp('L2', true);"
class="phplmold">Woodcrafts</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpProject_Launch/_Elementary.html" id="refL16" onmouseover="LMPopUp('L2', true);"
class="phplmold"> Elementary</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>

<div id="L17" style="position: absolute; left: 0; top: 0; visibility: hidden;" onmouseover="clearLMTO();" onmouseout="setLMTO();">
<div align=left class=sub_menu_position><table border="0" cellpadding="1" cellspacing="0" class="darkbordertable">
<tr>
<td>
<table border="0" cellpadding="5" cellspacing="0" class="ivorybodytable" width="140">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="ivorybodytable" colspan="2" nowrap="nowrap">
</td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpWhat-27s_Working/z.COM.html" id="refL18" onmouseover="LMPopUp('L17', true);"
class="phplmold">z.COM</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpWhat-27s_Working/Lebel.html" id="refL19" onmouseover="LMPopUp('L17', true);"
class="phplmold">Lebel</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpWhat-27s_Working/Stright-MacKay-3A_Leading_the_Pack.html" id="refL20" onmouseover="LMPopUp('L17', true);"
class="phplmold">Stright-MacKay: Lead&#133;</a></td>
</tr>
<tr>
<td nowrap="nowrap"></td>
<td width="100%" class="ivorybodytable" valign="middle" nowrap="nowrap"><a
href="/pcc9/site/edit.phpWhat-27s_Working/j_McNeil.html" id="refL21" onmouseover="LMPopUp('L17', true);"
class="phplmold">j-McNeil</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<script language="JavaScript" type="text/javascript">
<!--
loaded = 1;
// -->
</script>
</body></html>


0
Comment
Question by:perldog
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 25

Accepted Solution

by:
James Rodgers earned 125 total points
ID: 9883146
it a select box issue, selects have infinite z-index, they will always appear on top, either reorganize the page so teh menues do not overlat the selects or use another option than select for the options
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 9883176
You should accept Jest_48's response as the answer--there is yet to be a work around (except using a div to hide/show select lists: a real pain).

Fritz the Blank
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9883206
i am also getting an error on line 650 of your code

function tables(){for(var i=0;i<btns.length;i++){if(btns[i][0]=="ilink")sb(i,ilink);if(btns[i][0]=="iimage")sb(i,iimage);if(btns[i][0]=="tr")document.write("</td></tr></table></td></tr><tr><td class=\"edit\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"edit\">");else{if(btns[i][0]!="")document.write("<img src=\""+getimage(btns[i][0])+"\" id=\""+btns[i][0]+"\" alt=\""+btns[i][1]+"\" title=\""+btns[i][1]+"\" onclick=\"cmd('"+btns[i][0]+"')\" width=\"23\" height=\"22\" style=\"border:outset 1px;\" onmouseover=\"this.style.border='inset 1px';window.status='"+btns[i][2]+"'\" onmouseout=\"this.style.border='outset 1px';window.status='"+copyright+"'\">");else document.write("<img src=\""+getimage(btns[i][0])+"\" alt=\"\" width=\"3\" height=\"22\">")}}}

btns[][0] is null or not an oblect
0
 
LVL 2

Author Comment

by:perldog
ID: 9883590
Are you telling me that there is no practcal way?

About the error Jester_48 noted, I am aware of the error-  the code was three times as long and I cut it down as much as I could for this post.  That is why there is an error.

Thanks, everyone for your help-- I am still optimistic!  :-)
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 16

Expert Comment

by:jaysolomon
ID: 9883653
the only way to do this is hide the object that is below the select using onclick="document.getElementById('someID').style.display = 'none';" onchange="document.getElementById('someID').style.display = '';"
0
 
LVL 2

Author Comment

by:perldog
ID: 9884292
Someone gave me a fix and it works!  Except the links in the dropdown menu no longer work!  Without the tweek all links work.  After the tweek, only the top level links work.

How can I get the links to work again?

The following was given to me by Xin of yxScripts.com.

if (DOM) {
  // modified by Xin
  // ---------------
  if (IE5) {
    l=document.getElementById(layer);
    if (typeof(l.ifrm)=="undefined") {
      l.ifrm=document.createElement("IFRAME");
      l.ifrm.src="java script:false";

      with (l.ifrm.style) {
        position="absolute"; left="0px"; top="0px";
        visibility="inherit";
        width=l.offsetWidth+"px"; height=l.offsetHeight+"px";
        zIndex=1;
        filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
      }
      l.appendChild(l.ifrm);
    }
  }
  // ---------------
  document.getElementById(layer).style.visibility = "visible";
} else if (NS4) {
0
 
LVL 2

Author Comment

by:perldog
ID: 9884328
The code above replaces:


if (DOM) {
  document.getElementById(layer).style.visibility = "visible";
} else if (NS4) {
0
 
LVL 16

Expert Comment

by:hankknight
ID: 9921959
change

zIndex=1;

to

zIndex=-1;
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10394489
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Jester_48 {http:#9883146}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now