Page 1 of 1

[Solved] Getting out of Frame.. plz help

Posted: Wed Dec 28, 2005 3:58 am
by pookie62
Hi,
I have a frameset, main and leftframe.
In the mainframe I have a menu poping up when mouse is rightclicked. When I want to to mainpage its loaded in the mainframe.
How do I prevent that and load the normal page (no frameset)
and closing the frameset ?
Thanks

Posted: Wed Dec 28, 2005 5:38 am
by foobar
If you want to break out of the frames, make your link(s) be of the following form:

Code: Select all

<a href="#" onclick="window.top.location='mynewlocation.html';">I love bananas</a>

Posted: Wed Dec 28, 2005 6:07 am
by pookie62
Hi foobar,
Thanks for your reply, but the menu is js script and build like this :

Code: Select all

m1[3]=new Array("Nieuws","../menu/icons/pelle.gif","goto('../info/nieuws.php')");
How can I implement it in this syntax ?

Posted: Wed Dec 28, 2005 7:49 am
by foobar
pookie62 wrote:How can I implement it in this syntax ?
I have no clue how your menu system works, but I'll give it a shot:

Code: Select all

m1[3]=new Array("Nieuws","../menu/icons/pelle.gif","goto('javascript:window.top.location="../info/nieuws.php"')");
Not sure if ../ is allowed in window.location, but give it a try.

To be honest, I think the best place to ask this would be the menu system's own forum, if they have one. If not, well then we'll just keep trying!

Posted: Wed Dec 28, 2005 7:59 am
by pookie62
Noop.. doesn't work..
Tried several variants on this but without luck..

This menu has no own Forum unfortunately..
Thanks for supporting !

Posted: Wed Dec 28, 2005 8:19 am
by Chris Corbyn
It would help us a lot more if you posted the actual code that handles that function call. The functions that build your menu :)

Posted: Wed Dec 28, 2005 4:32 pm
by pookie62
Got the solution.. added this function:
function gotoNoFrames(url){
top.location = url;
}
and calling like this:
gotoNoFrames('../agenda/agenda.php#januari')");

Thanks for your time !!