Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:32
open new window from submenu with no address bar, menu bar
Poster: prasanna
Dated: Friday July 12 2002 - 9:42:19 BST
Hi,
Anyone pls help to sort this problem i would like to open a new window from a submenu with no address bar how to do that. I tried with this coding
Code:
,"Telerate-on-Internet","../product/TelerateOntheInternet/TelerateonInternet2.htm" target="pdf" onclick="msgwindow=window.open('','pdf','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=900,height=600');msgwindow.focus()",,,,1
thanks for ur valuable time.
cheers
prasanna
Poster: Andy
Dated: Friday July 12 2002 - 11:23:38 BST
Here's a sample function to open a window, this will need to be changed to suit your needs
Code:
function MM_openwin(MM_file,MM_height,MM_width)
{
MM_config=""
MM_config+="toolbar=no,";
MM_config+="location=no,"
MM_config+="directories=no,";
MM_config+="status=yes,"
MM_config+="menubar=no," //Not on Apple Mac for obvious reasons
MM_config+="scrollbars=yes,"
MM_config+="resizable=yes," //Mac windows are always resizable
MM_config+="copyhistory=no,"
MM_config+="width="+MM_width+","
MM_config+="height="+MM_height
var MM_win=open(MM_file,"",MM_config);
MM_win.focus();
}
{
MM_config=""
MM_config+="toolbar=no,";
MM_config+="location=no,"
MM_config+="directories=no,";
MM_config+="status=yes,"
MM_config+="menubar=no," //Not on Apple Mac for obvious reasons
MM_config+="scrollbars=yes,"
MM_config+="resizable=yes," //Mac windows are always resizable
MM_config+="copyhistory=no,"
MM_config+="width="+MM_width+","
MM_config+="height="+MM_height
var MM_win=open(MM_file,"",MM_config);
MM_win.focus();
}
And here is a sample meu item to call the above function
Code:
,"Sample","javascript:MM_openwin(\"http://www.google.com\",300,400);",,,1
Note the use of escaped double quotes for the URL.
Cheers
-- Andy