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

Get out of frames


Poster: Hans1bad
Dated: Wednesday September 6 2006 - 15:47:57 BST

I have one "page" with frames on the web site.
I have the frame based menu semi working, however, each link opens in the body of the frame, thus the web site becomes nested.

I have two questions:
1. How do I prevent above.
2. If I click on a sub menu link, I want to completely leave the frame based page and go to the selected link.

Thanks
hans


Poster: John
Dated: Wednesday September 6 2006 - 19:34:06 BST

Have you looked at this info?

Working, sorta


Poster: Hans1bad
Dated: Wednesday September 13 2006 - 14:30:43 BST

Thanks, the link helped me along 80% of the way. 8)
The part I was missing was to add:
target=_new; to the menu line. This opens up a new browser.
Is there a way to close the browser that launched the new instance of the browser?


Poster: Ruth
Dated: Thursday September 14 2006 - 0:34:03 BST

Hi,

I believe you'll need some kind of function for that. I don't do functions, but as an example, if you put this at the top of your menu_data.js file just above the style

Code:
var newwindow;
function poptastic(url)
{
   newwindow=window.open(url,'name','height=500,width=400,left=100,
  top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
  newwindow.focus();
}


Then in any aI string url where you called that function, the page would open in a new window with the specified attributes and, the second part of the function is the newwindow.focus so that window would have focus. Of course you dont' really need the attributes unless you want to specify the size and such. I think if you remove all that you just get a regular window.

You'd call it in the aI string in the following manner, note that you no longer have target since you're using a js function to open the new window.

Code:
aI("text=item;url=javascript:poptastic('http://whatever.html/');");


Now, I don't do functions, but I know there is one for closing the window in which you have done the click, self.close, so I wonder if you put that into the function if it would close the window. I don't know how to add functions to a function, so I can only suggest you try substituting self.close for the newwindow.focus and see if that works.

Sorry, I don't know more, that's all I can think to try unless you can find someone who knows how to write the function you need.

Ruth