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

iframe


Poster: novalis
Dated: Wednesday September 1 2004 - 19:52:56 BST

Hey..

Im new with ur menu...but I already think its great...
I just got one lil problem..
How can I make change it...so it will open the page not in the same frame...i want it to load in an iframe..

mfg

novalis


Poster: Andy
Dated: Thursday September 2 2004 - 9:43:34 BST

Hi,

Welcome to the forum.

Take a look at http://www.milonic.com/menusample11.php it helps describe the methods for opening links in other windows.

The property you need to add is target=windowname, this is added to your aI() string and the windowname is the name of the window you want to open the link in.

Hope this helps
Andy


Poster: novalis
Dated: Thursday September 2 2004 - 18:00:39 BST

Thx...

I know that I have to enter target=...

But I dont know where...
And inthe script I cant find an 'ai' string...

there are 2 javascripts...
mmenu.js and menu_array.js...

and in neither one I can find an 'ai' string...

Do I have to write the ai string in there by new then ??...and when...where do i enter it...


thx 4 ur help

novails


Poster: Ruth
Dated: Thursday September 2 2004 - 20:02:32 BST

Hi,
You need to take a look at the Beginners' Guidesection. The aI strings are in the menu_data.js file, that's where you put your text that is showing on the menu and the urls for the links, the target frame for the link etc. And, if you're using an iframe, then you need to look at the link Andy gave, about 1/2 way down the page you'll see information about iframes, having to give it an id, and having to use a function in the html section of the page.

Ruth


Poster: John
Dated: Thursday September 2 2004 - 20:30:31 BST

novalis wrote:
there are 2 javascripts...
mmenu.js and menu_array.js...

If those are the only scripts you have, then you are running v3 of the menu. That version is no longer supported or developed. You'll need to upgrade to the new version 5 system (now at v5.44) at http://milonic.com/.

no good :/


Poster: MisterX
Dated: Wednesday May 4 2005 - 1:45:14 BST

Hey.
this is probably old post i'm bringing back to life, but oh well lets see if you can help me.

few days ago i found out about milonic menu, I'm using it as a popup window for already designed menu i made myself in photoshop/imageready..

at first opening in iframes worked with target=main; <- main was iframe name&id.

then I played with the menu and downloaded different version also since i was looking for something that goes well in rtl.. but that's irrelevant.

after playing and using different versions and designs for the menu the target=main; doesn't work anymore and the window being opened in _self instead of the existing page. so i looked around a little bit and found out the openiframe function. but that is tottaly bugged. tried copying past exactly same lines from source and modify where needed but it seems to work "sometimes" if i click on it 100 times, it gives error and once in many clicks in decides to show the link in the iframe for no reason...

help !


Poster: Ruth
Dated: Wednesday May 4 2005 - 3:06:13 BST

MisterX,

Are you using version 5 of the menu? If you could give us a test page it would help us find and fix the problem. If it is version 5, and you are trying to open links in the iframe from the menu you need to put this on the page that contains the iframe.

Code:
<script>
function openIFrame(iFrameId,winURL)
{
ifId=gmobj(iFrameId)
ifId.src=winURL
}
</script>


You need to name our iframe, for example tempiframe is the name of this iframe.
Code:
<iframe
src="1joukkue.html" id="tempiframe" name="tempiframe"
frameborder="0" height="420" width="500"></iframe>


Then in the menu data file, in the aI string where you put the url for the page you want to open in the iframe you code it like this
Code:
aI("text=Whatever Text You Want to Show on the Menu;url=javascript:openIFrame('tempiframe','page2.htm');");


Substitute whatever you have named your iframe for the tempiframe and whatever page you want to load into the iframe for the page2.htm

Outside of this, we need to see a test page that is showing the problem.

If you are using version 3, that version is no longer supported. It has been out of development for a couple of years, I think.

Ruth


Poster: MisterX
Dated: Wednesday May 4 2005 - 12:10:51 BST

Yes mate, I did all of that. hold on I'll upload my page. since it's on hebrew you'll find it hard to understand. just use mouseover on second button from the right side...

it will open a menu. if you go to "New Gear", the first 3 are using openIframe function to "mainiframe" id. sometimes they work, but mostly give js error. if you go down a bit or to the other links, they're using target=main; and sometimes they work but mostly open in new page.

almost forgot: http://www.tribesattack.com/~misterx/li-yam-new/

Some of the code I'm using:
Code:
<script>
function openIFrame(iFrameId,winURL)
{
   ifId=gmobj(iFrameId)
   ifId.src=winURL
}

</script>



Code:
<iframe src="home.html" allowtransparency="true" id=mainiframe scrolling="auto" frameborder="0" name="main" width="590" height="443" alt="">
         Your browser does not suppurt iframe
         </iframe>



Code:
<a href=# onMouseOver="popup('selling','sellingmenu');sellingmenu.src='images/index_11ov.jpg'" onmouseout="popdown();sellingmenu.src='images/index_11.jpg'"><img src="images/index_11.jpg" width="65" height="14" alt="" border="0" name="sellingmenu"></a></td>


and my menu_data_hebrew.js is
Code:
   aI("text=&nbsp;Kites;url=javascript:openIFrame('mainiframe','new/kite.html');");
   aI("status=PHP - Web Server Scripting as used by Milonic;text=PHP - Development;url=javascript:openIFrame('mainiframe','http://www.php.net/');");
   aI("status=PHP Based Web Forum, Milonic's Recommended Forum Software;text=phpBB Web Forum System;url=javascript:openIFrame('mainiframe','http://www.phpbb.com/');");
   aI("text=&nbsp;Wind;url=http://www.google.com;target=main;");
   aI("text=&nbsp;Wave;url=http://www.google.com;target=main;");
   aI("text=&nbsp;Kayaks & Misc;url=http://www.google.com;target=main;");



ps. thanks for the fast reply and sorry for the long posts :|


Poster: MisterX
Dated: Wednesday May 4 2005 - 15:23:17 BST

by the way, I did update it and tried in many ways before.
at the moment both name & id are "main" and the target/openiframe lead to main.

that's obviously aint it... what's wrong with the code? I also checked and i've got the latest 5.722


Poster: Ruth
Dated: Wednesday May 4 2005 - 15:32:28 BST

Hi

I'm not able to repeat what you say is happening, except for the target=main opening in the iframe. It worked every time I clicked the links to the pages. On what browser and OS does this happen?

Ruth


Poster: MisterX
Dated: Wednesday May 4 2005 - 17:04:17 BST

what's happening is - target=main sometimes works for me but most of the time pointing to new window

openiframe rarly works but most of the time gives js error.

I'm using latest IE and win xp sp2


Poster: kevin3442
Dated: Tuesday May 10 2005 - 0:51:12 BST

Hi MisterX,

Just tried your test link, but got no page. Are you still looking for some help, or have you solved it?

Cheers,

Kevin