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

Mainmenu-item opens in new windows and not in main-frame


Poster: Christiaan
Dated: Thursday November 2 2006 - 10:51:59 GMT

Hello,

If search the forum, but I couldn't find the answer I'm looking for.
The problem I get in the Menu in a frame-based environment is when I'm clicking on a mainmenu-item such as Home or About Milonic the menu opens in a new windows, even if I say it must open in a the main-frame. With menu on the site it works fine I see.
Can anybody help me with this? What am I doing wrong.

Grtz


This is the header frame .js
_menuCloseDelay=500;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-130;

with(miniStyle=new mm_style()){
styleid="1";
name="miniStyle";
oncolor="#FFFFFF";
onbgcolor="#4F8EB6";
offcolor="#000000";
offbgcolor="#FFFFFF";
padding="3";
separatorsize="1";
borderwidth="1";
fontfamily="verdana";
fontsize="10px";
}


with(milonic=new menuname("Main Menu")){
style=miniStyle;
alwaysvisible=1;
orientation=1;
top=0;
left=150;
aI("text=Home;url=main.aspx;target=mainframe;");
aI("text=Project;showmenu=Project;onfunction=openSubmenu();offfunction=closeSubmenu();target=mainframe;");
}

with(milonic=new menuname("Home")){
style=miniStyle;
overflow=scroll;
}

with(milonic=new menuname("Project")){
style=miniStyle;
aI("text=Gebruikers;url=Grid.aspx?mnu=Gebruikers;");
aI("text=Ontheffing;url=Grid.aspx?mnu=Ontheffing;");
}

drawMenus();


This is the main frame .js
_menuCloseDelay=500;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-130;

with(miniStyle=new mm_style()){
styleid="1";
name="miniStyle";
oncolor="#FFFFFF";
onbgcolor="#4F8EB6";
offcolor="#000000";
offbgcolor="#FFFFFF";
padding="3";
separatorsize="1";
borderwidth="1";
fontfamily="verdana";
fontsize="10px";
}

with(milonic=new menuname("Home")){
style=miniStyle;
overflow=scroll;
}

with(milonic=new menuname("Project")){
style=miniStyle;
aI("text=Gebruikers;url=Grid.aspx?mnu=Gebruikers;");
aI("text=Ontheffing;url=Grid.aspx?mnu=Ontheffing;");
}

drawMenus();

Re: Mainmenu-item opens in new windows and not in main-frame


Poster: kevin3442
Dated: Friday November 3 2006 - 21:54:54 GMT

Christiaan wrote:

...The problem I get in the Menu in a frame-based environment is when I'm clicking on a mainmenu-item such as Home or About Milonic the menu opens in a new windows...


-----

Hi Christiaan,

Hmmmm... don't know how the menu would open in a new window. I'll assume you mean that the page the menu item's url points to opens in a new window, correct? (Not trying to be a smart-ass, just making sure I understand the issue).

If the page is opening in a new window, where you have a menu item like this:
Code:
aI("text=Home;url=main.aspx;target=mainframe;");

then my first guess would be that you don't actually have a <frame> named "mainframe". Check your <frameset>... did you name the intended frame? i.e:
Code:
<frame name="mainframe" src="whatever.htm">


Hope that helps,

Kevin


Poster: Christiaan
Dated: Monday November 6 2006 - 8:20:54 GMT

Hi Kevin,

Maybe this example will help.
Take the milonic-menu on the milonic website. When you click on the "home"-mainmenubutton it will open in the mainframe of the site. When I click on my site on the home-button or on the mainmenu-buttons, such as Home, it opens in a new window.
When I make from Home a submenu-item the menu runs correct and opens in the mainframe.

The examples of my .js files are included, so that somebody maybe find an incorrect item or something that makes this problem. The names of the framesets are correct.


Grtz, Christiaan