How to fix problem with dropdown appearing infront of dhtml menu in Internet explorer

Just include attachIframe function with your onClick or onmouseover function

<a style=”cursor:pointer” onClick=”searchJob(); attachIframe(’testhide’);”>Quick Job Search</a>

[note:] testhide is the div id which you need to replace by your div id.

And the function is given below just paste this in your html or js page… and enjoy.

<script type=”text/JavaScript”>
{literal}
function attachIframe(divId)
{

if(navigator.appName.indexOf(’Microsoft’) != -1)
{
var div = document.getElementById(divId);
var iframe = document.createElement(’IFRAME’);

iframe.id = ‘fake-iframe’;
iframe.style.position = ‘absolute’;
iframe.style.left = getOffsetLeft(div);
iframe.style.top = getOffsetTop(div);
iframe.style.width = (div.offsetWidth) + ‘px’;
iframe.style.height = (div.offsetHeight - 10)+’px’;
iframe.style['filter'] = ‘alpha(opacity:100%)’;
iframe.style.zIndex = 4;
document.body.appendChild(iframe);
}
}
{/literal}
</script>

One Response to “How to fix problem with dropdown appearing infront of dhtml menu in Internet explorer”

  1. hey
    it has worked and great relief for me :DDDDDD
    thanks buddy keep goingggggggg

Leave a Reply