Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:01

Can I place an iFrame inside a SubMenu?


Poster: The Ricster
Dated: Wednesday July 12 2006 - 12:59:59 BST

I can't seem to find an answer to this question, but I would really like to know if it is possible.

I would like to place a main menu and several sub-menus containing iFrames, on a page.

Is this possible, and if so, what are the limits of communication between them?

Thanks in advance for any assistance. :)


Poster: Ruth
Dated: Wednesday July 12 2006 - 22:29:43 BST

Hi,

Yes, you can put an iframe into the menu_data file. But, you'd better make sure you test it in different browsers.

For example, in IE and FF, if you have the milonic.com homepage as the page in the iframe, when you mouseover the link to open the iframe it takes you to the page. That may be because it has a break out of frames code, or it may be because it's php, I have no idea.

In Opera if you try to put the milonic page in the iframe, opera will open it after a number of error messages that has to do with trying to read protected code, and the menu on the page doesn't show when it is loaded.

Also, when you mouseover the item that is opening the iframe and its page, even if just in passing, the browser does the connecting to and reading, though it doesn't load the page if the iframe menu is no longer open.

Also, if there is sound on the page, even if you go to another menu item and therefore close the iframe the sound will continue to play until it's done, so if the page has looped sound it will always be there.

Now, some good things, if the page you have in the iframe has a milonic menu on it, the menu will show and will work, at least in IE, NN, and FF and the pages load into the iframe.

Kind of a neat idea, if it will work in most browsers. You could create separate menus for areas of the site and have it open from the one menu in iframe pages.

Hope this helps. I have no idea about Macs

Ruth


Poster: Ruth
Dated: Wednesday July 12 2006 - 22:34:49 BST

Opps :oops: I forgot to put the code.

Code:
aI("text=<iframe id='tempiframe' width='550' height='350' src='http://www.poems2u.com/writings/index506.html' frameborder='1' scrolling=yes> </iframe>;keepalive=1;type=html;");


Note the keepalive, that is to keep that window open once it is open until you mouseover another item, otherwise the window would close when you moused into it since the menu would think you are no longer on that submenu.

The type=html; is required since you are using html. If you don't have it then links and such on the page in the iframe won't always work.

Ruth


Poster: The Ricster
Dated: Thursday July 13 2006 - 7:41:49 BST

:) Thank you so much Ruth. That is excellent info, but it prompts a couple more on this subject:

1. When the menu that contains the frame is collapsed, is the iFrame destroyed? when I re-open the menu, will my iFrame be in the state I left it, or will it reload each time it's displayed?

2. Are ALL items included on a menu re-created on display of the menu? Even objects (like flash movies and such).

3. Can iFrames be placed on top of menus and sub-menu displays, considering (from the posts I've read), that you guys have spent considerable efforts making sure that they overlap them ;) ?

Also, it appears that you've taken time to test some of this stuff...THANK YOU !!!


Poster: Ruth
Dated: Thursday July 13 2006 - 8:25:57 BST

Hi,

1. When you click to open the iframe item [I set it to openonclick but you can do it onmouseover also] when you click it, the iframe opens and the page loads. If it's a big page it takes time. Then once the page is loaded when you close the iframe, then open it again the page is still there, it doesn't have to load again.

However.... if you click a link on that iframe page and another page opens in the iframe, and then close the iframe, that is the page which is there when you open it again. Also, if you click to another page in the iframe, and then you hit the browser back button, the previous iframe page opens in the full browser window and you lose your page on which the menu is located.

The Ricster wrote:
2. Are ALL items included on a menu re-created on display of the menu? Even objects (like flash movies and such).


I have no idea what you are asking here.

3. Yes, you can get an iframe to sit on top of the menu, I don't know why you'd want to do that, but you would put the iframe in a div with the z-index set to 1000 or greater.

You can also do that with the iframe inside the menu, and it will open over another menu, but it would do that anyway. I'm not sure if I really understand what you want in this instance.

Ruth