[Solved] Getting out of Frame.. plz help

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
pookie62
Forum Commoner
Posts: 92
Joined: Tue Dec 07, 2004 2:44 pm

[Solved] Getting out of Frame.. plz help

Post 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
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post 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>
pookie62
Forum Commoner
Posts: 92
Joined: Tue Dec 07, 2004 2:44 pm

Post 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 ?
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post 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!
pookie62
Forum Commoner
Posts: 92
Joined: Tue Dec 07, 2004 2:44 pm

Post by pookie62 »

Noop.. doesn't work..
Tried several variants on this but without luck..

This menu has no own Forum unfortunately..
Thanks for supporting !
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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 :)
pookie62
Forum Commoner
Posts: 92
Joined: Tue Dec 07, 2004 2:44 pm

Post 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 !!
Post Reply