Send an iFrame to back

  • Thread starter Thread starter Sunil Menon
  • Start date Start date
S

Sunil Menon

Dear All,
I am using a menu control that is inside an iFrame...the parent
page contains around three iFrames...after rendering the menu
control...on click of the menu..the sub menus appear behind the
iFrame...how do I get the sub menus in front....

The menus are plain HTML tags...

Please help...

TALIA
Many Regards
Sunil
 
Dear Vidar,
Thanks for the quick reply...we tried using the z-index but the
z-index applies only to the iFrame...and since the Page contains the
iFrames...the menus still appear behind one of the iFrames...I cannot
use createpopup as I need to send menu clicks to the page that is loaded
inside a iframe...the clicks will be client side clicks or server side
clicks...

If u have any idea...it will be of great help...

Thanks & Regards
Sunil
 
Hi

So the menus are located in the page hosting the iframe(s)?

iframe is window-less as of IE5.5 and should work fine with z-index

Basic example:
<HTML><HEAD>
<SCRIPT>
function toggle(sElID){
if(!document.getElementById ) return;
var e = document.getElementById(sElID);
if(e!=null) e.style.display = ( e.style.display == "none" ) ? "block" :
"none";
}
</SCRIPT>
</head>
<BODY>
<div onmouseover="toggle('myDiv')" onmouseout="toggle('myDiv')"
style="cursor:hand">Menu</div>
<DIV id="myDiv" style="Z-INDEX: 2; POSITION:
absolute;background-Color:blue;display:none">
blah<BR>
<BR>blah
</DIV>
<IFRAME src="about:blank" frameBorder=1></IFRAME>
</BODY></HTML>

For browsers that do not support the z-index you can simply hide the iframe
when menu appears
myIframe.style.visibility = ( myIframe.style.visibility == "hidden" ) ?
"visible" : "hidden";

If this does not help send me the URL and I will take a look
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
 
Back
Top