Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:26
Displaying subMenu OVER an IFrame
Poster: msaunders
Dated: Wednesday July 2 2003 - 8:26:30 BST
HI
I am using an IFRAME on my webpage. The Iframe is displaying data from another site. Problem is , my submenu appears 'behind' the iframe . I cant for the life of me get it to appear over the iframe. Is there a way to do this ? I have tried putting the Iframe in a layer , and give the layer a z-index of 18 , but it makes no diff. Am I right in saying that the menu is using z-index of 19 ? This 'BUG' seems to appear in IE5 , but its fine in IE5.5 Upwards.
Thanks
Martin
Similar issue
Poster: jonathan
Dated: Wednesday July 2 2003 - 13:22:48 BST
The menu over an IFRAME is also fine in IE6.
In a related issue however, I have experienced an identical problem with a FRAME rather than an IFRAME. Has anyone seen this and solved it?
IFRAME WORKAROUND
Poster: Hergio
Dated: Wednesday July 2 2003 - 13:31:26 BST
If you go to http://www.milonic.com/v5_rc1/iframes.htm you will see an example of how to make menus appear on top of iframes. Pull up the source code of the page and you will see something added to each menu definition called hidediv. This allows you to tell each menu individually what iframes to appear in front of.
i.e.
hidediv="iframe1"
will make this menu appear in front of the iframe whose id is iframe1.
I have yet to try and see if this new version has the ability to jump across frames. Probably not without some clunky workaround. In the previous version of the menu, it could be done but both pages had to have copies of the menu_array file and the menu declarations had to reference the menus located in the other frames. You can probably see examples of this in his demos section of the menu website.
Good luck, hope this helps!
Poster: msaunders
Dated: Wednesday July 2 2003 - 13:40:07 BST
Hi there
Thanks for that, it works , BUT, in IE5, it removes the Iframe when the submenu drops down , it reappears when the submenu closes. Looks a bit weird. Dunno is there is a fix for that . If you have access to IE5.0, give it a go.
Rgds
Martin
Poster: MKrumm
Dated: Tuesday July 8 2003 - 12:54:50 BST
I have the same problems using the menu over an iframe in IE5.
do i need a specific version of the milonic-menu?
i would be very happy, if someone would have a workaround for this!!
thank you very much!!
Poster: Hergio
Dated: Friday July 11 2003 - 2:26:38 BST
Try release candidate 2. I dont have IE 5 so I cant test it, but there is also a iframes example in the rc2 directory.
http://www.milonic.com/v5_rc2/menu.htm
The iframes page is
http://www.milonic.com/v5_rc2/iframes.htm
Andy, is this a known bug and fixable? In IE 6, the iframes and menu work perfectly as expected.
Poster: MKrumm
Dated: Monday July 14 2003 - 15:16:27 BST
can i include the -hidediv="iframe1"- in the milonic-menu version 3.5.12?!
if i can, where in the js-file i have to place it?! and is "iframe1" the id or the name (or whatever) of the iframe i use?!
thanks-a-lot!!
matthias
Poster: Hergio
Dated: Tuesday July 15 2003 - 12:41:47 BST
I am currently still running 3.5.10 on my site (until I upgrade to v5) and I have no problems going over iframes (even with alpha transparency) using IE 6.
As far as I can tell there is no flag to set in v3 that tells it to go over iframes. It should try and render itself on top of all iframes.
And iframe1 is the ID of the object. Usually in this type of environment in the document object model of a browser, you want to refer to the ID of the object, not the name. Name is used, for example, in forms. When you submit something, you can refer to something submitted by its name. The id is local to the current page and allows you to reference things in it by name, err id.
Poster: MKrumm
Dated: Tuesday July 15 2003 - 12:53:14 BST
but in IE5/v3 the submenu appears under the iframe!
so, the only solution is to upgrade to v5, where i can set the hidediv-flag?!
Poster: msaunders
Dated: Tuesday July 15 2003 - 12:55:30 BST
Hergio wrote:
I am currently still running 3.5.10 on my site (until I upgrade to v5) and I have no problems going over iframes (even with alpha transparency) using IE 6.
As far as I can tell there is no flag to set in v3 that tells it to go over iframes. It should try and render itself on top of all iframes.
And iframe1 is the ID of the object. Usually in this type of environment in the document object model of a browser, you want to refer to the ID of the object, not the name. Name is used, for example, in forms. When you submit something, you can refer to something submitted by its name. The id is local to the current page and allows you to reference things in it by name, err id.
As far as I can tell there is no flag to set in v3 that tells it to go over iframes. It should try and render itself on top of all iframes.
And iframe1 is the ID of the object. Usually in this type of environment in the document object model of a browser, you want to refer to the ID of the object, not the name. Name is used, for example, in forms. When you submit something, you can refer to something submitted by its name. The id is local to the current page and allows you to reference things in it by name, err id.
Hergio, the issue is not with IE6, it is with IE5
martin
Poster: icebits
Dated: Wednesday July 16 2003 - 1:58:03 BST
IFrame is threated as windows component in IE 5.0, so it doesn't affect by z-index. To make layer appear ontop IFrame, is to hide the IFrame. ** Only IE 5.5 & above can control by z-index to bring it behind or ontop the layer. Am i right?
Poster: msaunders
Dated: Wednesday July 16 2003 - 8:12:35 BST
icebits wrote:
IFrame is threated as windows component in IE 5.0, so it doesn't affect by z-index. To make layer appear ontop IFrame, is to hide the IFrame. ** Only IE 5.5 & above can control by z-index to bring it behind or ontop the layer. Am i right?
Well , to rephrase your sentence, it looks like only IE5.5+ can handle layers and IFrame combinations? Then yes, I think you are right .
Martin
Poster: kevin3442
Dated: Thursday July 17 2003 - 8:05:46 BST
Hi All,
Just to add my two cents... In various older browsers (e.g. IE5), an iframe is not really an html element. I believe it is actually an embeded instance of the browser. As such, it will not respond to layering (z-index, etc). In this regard, there is no difference in how iframes interact with the Milonic menu, no matter which menu version you are using. In other words, it's a browser-related problem, not a menu-related problem... all dhtml elements are affected similarly by iframes, whether they are part of a menu or part of some other script or system (e.g., a text scroller). In version 3 of the menu system, people had to deal with iframe problems the same way as discussed in this thread; by placing the iframe in a div and hiding it when the overlapping menu opened. The main difference is that, with v3 of the menu, if the built-in div hiding function (originally meant for problematic form elements) didn't work, you had to provide your own code extensions to do the job. Version 5 seems to have more flexible facilities for this sort of thing.
One trick you might try to improve the aesthetics when hiding the iframe is to place an image -- perhaps a screen capture of the iframe's default content -- in a layer directly behind the iframe. The image should be the same size and in the same location as the iframe (ideally, it'll look like the iframe with some content displayed). This way, when you hide the iframe, you don't end up with a big "hole" in the middle of your page where the iframe's content used to be. And since the user is obviously opening menus at the time, his or her attention will be on the menu, so the change will be less noticable.
One other thing worth noting about iframes is that you should avoid them if you want your site visitors to be able to view your site with NS4 (some developers care, others don't), because if I recall correctly, NS4 does not support iframes.
It's also worth noting that there are various other "things" that do not respond well to layering and therefore do not play well with dhtml. These include some form elements (e.g. multi-line selects, radio buttons), java applets, and flash clips. Whether these things will pose a problem also depends on the browser and version in use, where older browsers are obviously worse.
Hope that helps,
Kevin
Poster: TinoG
Dated: Monday August 4 2003 - 11:53:17 BST
hello,
the postet link http://www.milonic.com/v5_rc1/iframes.htm dosent work anymore. can anyone poste the part with the hidedev=iframe1. i dont know where it be placed.
thanks
tino
Poster: fredlongworthhighschool
Dated: Monday August 4 2003 - 13:55:30 BST
This is from V4. The earliest V5 I have is RC2.
Code:
with(milonic=new menuname("support menu")){_c=1
borderwidth = 1;
style = mainStyle;
hidediv="iframe1"
aI("text=Milonic Disussion Forum;url=http://www.milonic.com/menu/forum");
aI("text=Menu Support Mailing List;url=/mailman/listinfo/menu-dev;target=_blank");
aI("text=Paid Support Page;url=http://www.milonic.com/menu/reqhelp.php");
aI("text=Frequently Asked Questions;url=http://www.milonic.com/menu/faq.php");
aI("text=Version Information;url=http://www.milonic.com/menu/versioninfo.php");
aI("text=Licensing;showmenu=licensing");
}
borderwidth = 1;
style = mainStyle;
hidediv="iframe1"
aI("text=Milonic Disussion Forum;url=http://www.milonic.com/menu/forum");
aI("text=Menu Support Mailing List;url=/mailman/listinfo/menu-dev;target=_blank");
aI("text=Paid Support Page;url=http://www.milonic.com/menu/reqhelp.php");
aI("text=Frequently Asked Questions;url=http://www.milonic.com/menu/faq.php");
aI("text=Version Information;url=http://www.milonic.com/menu/versioninfo.php");
aI("text=Licensing;showmenu=licensing");
}