Send an iFrame to back

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
 
S

Sunil Menon

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
 
V

Vidar Petursson

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
==============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top