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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:30

Menu links


Poster: dennis801
Dated: Friday May 23 2003 - 19:09:46 BST

Hello

I have made the menu that I had download and I have installed it. I don't want to put the central code in every page so I have made one page and than I use I-frame on every page. But than when I click on a link only the I-frame change. Now I use target blank, but than everytime I click than appear a new window. Now is my question. Is it possible to link in a I-frame and that the page appear in the browser window where you are working in? (yeah sorry I'm Dutch and my English isn't good at this time :D )

I hope somebody understand me

Thanx Dennis

Example http://www.gruwelijkmooi.nl/Formule1/formule1.php

Menu links


Poster: Non
Dated: Thursday July 3 2003 - 13:24:14 BST

Hoi, daar je zegt dat je engels niet zo goed is, zeg ik het maar even in het Nederlands:

Het Milonic menu werkt niet zo betrouwbaar met frames, dus ikzelf gebruik dat om nog meer redenen liever niet. Overigens moet je voor een i-frame ook op elke pagina een regel code invoeren, dus waarom niet een regeltje extra en je hebt een goed menu?

Wat de link betreft, misschien moet je target _top of _parent eens proberen, maar of dat goed werkt met i-frames heb ik zelf nooit uitgeprobeerd.

Overigens kon ik je probleem niet vinden op de URL die je opgeeft, maar misschien ligt dat aan mij, of heb je het probleem zelf al opgelost...


Poster: Hergio
Dated: Thursday July 3 2003 - 19:19:49 BST

dennis,
You said that the reason you created the iframe was because you do not want to put the menu code on each and every page, correct?
You don't have to put the code on every page, you just put a one line link on each page to point at the source of the menu code.

Like this...
<SCRIPT language=JavaScript src="http://yourdomain/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="http://yourdomain/mmenu.js" type=text/javascript></SCRIPT>


Then its included on all of your pages.

If what you want to do is have whatever you click on in the menu display inside the iframe, then put into your menu code "target=iframeid " just like you would do if you wanted it to show up in another frame. Look to Andys frames examples to see how he has links open up in other frames and just change the target to point at your iframes.

Hope this helps! And if I am incorrect on anything, anyone feel free to correct me.

Good luck!


Poster: kevin3442
Dated: Tuesday July 8 2003 - 9:05:20 BST

Hi All,

Targeting an iframe from the menus works a little differently than regular frames. This example disucsses the use of a small javascript function to target iframes. You can copy the function right from the sample page.

Be aware that if you use iframes, you could run into a couple of issues:

(1) As far as I know, NS4 does not support iframes. So, if you want your site visitors to be able to use that stone-aged browser, you shouldn't use iframes.

(2) Perhaps more importantly, iframes in some older - but still fairly common - browsers (IE5 for example) are actually embeded instances of the browser and will not respond to layering. They occupy the top "layer" by default, so any dhtml element (like a submenu) that overlaps the position of the iframe will appear behind the iframe. You might avoid this problem by careful layout, but it's hard to imagine a menu of any size in a useable position not overlapping your main content area.

Hope that helps,

Kevin