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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Christiaan
Beginner
Beginner
Posts: 5
Joined: Thu Nov 02, 2006 11:39 am

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

Post by Christiaan »

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();
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

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

Post by kevin3442 »

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: Select all

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: Select all

<frame name="mainframe" src="whatever.htm">
Hope that helps,

Kevin
Christiaan
Beginner
Beginner
Posts: 5
Joined: Thu Nov 02, 2006 11:39 am

Post by Christiaan »

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