// This is the same as comboBox.js, except that it defaults the box to the selected // option, rather then blank for typing in. // window.onload=function(){ // setCombobox(true); //} window.onresize=function(){ setCombobox(false); } // ----------------------------------------------------------------- // // Loop through each select on the page, and check its class. If it // // has a class of comboBox, then attach the needed elements // // ------------------------------------------------------------------// var nTop; var nLeft; var detect = navigator.userAgent.toLowerCase(); function setCombobox(bMethod) { combos=getElementsByClassName('select', "comboBox"); for(i=0; i it will make the zindex work // // ------------------------------------------------------------------ // function initIframe(ctrl) { textWidth = textfield.offsetWidth; textHeight = textfield.offsetHeight; hackFrame = document.createElement("iframe"); hackFrame.setAttribute("src", "placeHolder.html"); hackFrame.setAttribute("scrolling", "0"); hackFrame.setAttribute("tabindex", "-1"); hackFrame.id = "frame" + ctrl.name; hackFrame.style.position = "absolute"; hackFrame.style.width = textWidth + "px"; hackFrame.style.height = textHeight + "px"; hackFrame.style.top = nTop + "px"; hackFrame.style.left = nLeft + "px"; hackFrame.style.marginTop = "3px"; hackFrame.style.marginLeft = "3px"; ctrl.parentNode.insertBefore(hackFrame, textfield); } // ------------------------------------------------------------------------------ // // Find the x and y position of the select box and return them // // ----------------------------------------------------------------------------- // function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; //alert(curleft); } } else if (obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; }