Opening more page's

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
oelie
Beginner
Beginner
Posts: 2
Joined: Thu Jul 03, 2003 10:28 am
Contact:

Opening more page's

Post by oelie »

I want to open more pages with one menu item, is that possible ?
On my site http://www.bernd-thijs.be/homer.html (sorry in dutch)
I used frames , I want when you open an item in the menu that the specific page diplays in the main frame but the picture above need to change also.
So my question is that possible?

Greets Oelie :mrgreen:
oelie
Beginner
Beginner
Posts: 2
Joined: Thu Jul 03, 2003 10:28 am
Contact:

Post by oelie »

User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Updating two frames with one click

Post by Hergio »

Just for future reference, the version of the menu you are using is version 3.x. You are in the version 4/5 forum. There is a forum dedicated to just version 3 help and assistance. Be sure to post to that one in the future if you have questions regarding the old version of the menu.

Ok, on to more pressing matters. Yes it is very possible to have to multiple pages be updated at the same time when you click a menu item. But it involves alittle bit of javascript 8O hope you're okay with that.

Basically in your menu declarations you will need to have something like this....

,"Link1","javascript:goToURLs('mainURL.html','topURL.html') onbordercolor=ff0000;offbordercolor=FFFFFF;",,"StatusBarText",0

In the head of your document with the menu in it, declare a function that looks similar to the following....

function goToURLs(main, top){
  parent.frames["topFrame"].location.href = top;
  this.location.href = main;
}


When you click on the menu item this function will be called with the two URLs you want to show. The top frame's location will be updated to the top parameter, and then the main page (this) will be updated to the main parameter. Hope this helps some!

Good luck!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply