I'am trying to implement a menu item opening a new window

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
trytrix
Super Advanced
Super Advanced
Posts: 92
Joined: Thu Sep 26, 2002 9:46 pm
Location: Flanders / Belgium
Contact:

I'am trying to implement a menu item opening a new window

Post by trytrix »

HI Guys,

I'am trying to implement a menu item opening a new window.
I included the suggested function:
function openNewWindow(winURL,winWidth,winHeight,winConfig){
mmConfig=""
mmConfig="width="+winWidth+","
mmConfig+="height="+winHeight+","
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}

into the "array.js" file.

Under Miscellaneous Menu Properties both entries :
,"<center>Onze nieuwsbrief","javascript:openNewWindow(\"Nieuwsbrief.html\", 500, 500, \"toolbar=no,location=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,\")",,,1

,"<center>Open Google in Window","javascript:openNewWindow(\"http://www.google.com\", 600, 400, \"status=yes,location=yes,resizable=yes\")",,,1

generate an "Error on page" error!

What am I doing wrong ?
Any idea ??

Many thanks in advance.
:P TryTrix
User avatar
trytrix
Super Advanced
Super Advanced
Posts: 92
Joined: Thu Sep 26, 2002 9:46 pm
Location: Flanders / Belgium
Contact:

Post by trytrix »

The solution is simple !!

The function adapted as follows:

function openNewWindow(winURL,winConfig){
mmConfig=""
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}


The menu item :
,"<center>Onze nieuwsbrief","javascript:openNewWindow(\"Nieuwsbrief.html\",\"width=450,height=475,toolbar=no,location=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no\")",,,1

:oops: TryTrix
Post Reply