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

Problems to open pages in a certain frame


Poster: Doc-Holiday
Dated: Wednesday June 22 2005 - 9:29:18 BST

Hi there,
I played around with the menue and managed to set it up the way I wanted but I have problems to make the pages open in the main frame window. Please have a look at http://www.treblebooster.net/test/index.html
There you can see the menue in the head frame. I want to open all the pages from there in the main frame (called "Haupt") but I can´t make it work. I played around with the "target" attribute but all it is doing is open the pages in a new window or as shown in the example, "overwriting" the head frame. The menue syntax can be seen at http://www.treblebooster.net/test/data.txt

Any ideas to make it work right ?

Thanks in advance and greetings from Germany

Doc


Poster: Ruth
Dated: Wednesday June 22 2005 - 17:00:12 BST

Hi Doc,

Took me a bit to figure this out. You're actually using an iframe in the 'kopf' frame of the frameset. I see you have the iframe function on the page, but to open pages in an iframe you need to code for that, not a target= code. So, this aI string
Code:
aI("text=RM Treble-Booster;url=rm.html;target=Haupt;");

should be coded like this
Code:
aI("text=RM Treble-Booster;url=javascript:openIFrame('tempiframe','rm.html';");



Hope that helps.

Ruth


Poster: Doc-Holiday
Dated: Thursday June 23 2005 - 6:49:28 BST

Hi Ruth,

good to see that you are still out here. Thanks for your suggestion, I inserted your code but now the menue opens nothing, maybe there is a typo inside the code ? I uploaded the new code, please click on "Medium Gain Booster" and try to open the "RM Treble Booster" page.

Hope to hear you soon and thanks in advance

Doc


Ruth wrote:
Hi Doc,

Took me a bit to figure this out. You're actually using an iframe in the 'kopf' frame of the frameset. I see you have the iframe function on the page, but to open pages in an iframe you need to code for that, not a target= code. So, this aI string
Code:
aI("text=RM Treble-Booster;url=rm.html;target=Haupt;");

should be coded like this
Code:
aI("text=RM Treble-Booster;url=javascript:openIFrame('tempiframe','rm.html';");



Hope that helps.

Ruth


Poster: Doc-Holiday
Dated: Thursday June 23 2005 - 12:06:16 BST

Hi Ruth,

I figured it out myself and it works:

I added a "name=xxx" attribute to the IFRAME tag and then you can use that name to target it from the menues "target" parameter, eg:

aI("text=RM Treble-Booster;url=rm.html;target=Haupt;");

Anyway, thanks for your suggestion and take care !


Poster: Ruth
Dated: Thursday June 23 2005 - 15:16:28 BST

Hi Doc,

I just tried your page and I cannot get any page to load in IE or Firefox.

You're code for the iframe call in the menu_data.js file is incorrect. You're missing a closing bracket for the iframe part of the call.

Code:
aI("text=RM Treble-Booster;url=javascript:openIFrame('tempiframe','fass.html';");
You need a ) after the fass.html' and before the ; so the code should be

Code:
aI("text=RM Treble-Booster;url=javascript:openIFrame('tempiframe','fass.html');");
And, on your main kofp.html page you should add a name to the iframe. Can't remember what browser that's for, maybe IE, and it may have been for something else that you needed both id= and name= but it doesn't hurt anything.

Code:
<IFRAME id=tempiframe name=tempiframe marginWidth=0
marginHeight=10 src="home.html" width="100%"
height="100%"></IFRAME>
The page then loads fine in the iframe in IE, Firefox and Netscape.

Ruth


Poster: Doc-Holiday
Dated: Friday June 24 2005 - 6:22:21 BST

Hi Ruth,

I thought it was a typo or so .... it´s not easy to manage all those little ) , ; etc. :D

But as mentioned in my previous message, I choose a much simpler solution by adding a "name=xxx" attribute to the IFRAME tag and call it with the "target" parameter inside both menues. I have uploaded all things now so that you can see what I mean.

Have a nice weekend

Doc