Forums Archive Index > SmartMenus 5 > Window launch size
Date: 16 May 2005 6:11 pm
I have been successfully using Smart Menu for over a year now and have had a lot of fun with it.
Now I would like to use it to launch a window ("newWindow") but have the size of the window defined, around 600 x 450. I know how to do it in the popup window using "resize in the window code but I would rather have it happen in the menuing.
Any ideas?
Thanks in advance.
Richard
rwengel{@}angelport.net
Date: 17 May 2005 3:05 am
Here's an example how you can do it with a simple JS function:
function openPopUp(url,name,features){
window.open(url,name,features);
}
Just add it somewhere in your configuration file (e.g. s_arrays.js) and then set your menu item like this:
{U:'javascript:openPopUp("your_link_here","mypopup","width=600,height=450")',T:'Menu item text'}
You also don't need to set the target "newWindow" for the item.
Date: 17 May 2005 4:34 pm
Thanks for the help. That absolutely did the trick
I have actually been having a lot of fun with your basic script and now it is handling almost all of the navigation for our site. (www.aesham.com)
It is a very flexible and reliable product.
Thanks again.
Richard
Quote:
Here's an example how you can do it with a simple JS function:
function openPopUp(url,name,features){
window.open(url,name,features);
}
Just add it somewhere in your configuration file (e.g. s_arrays.js) and then set your menu item like this:
{U:'javascript:openPopUp("your_link_here","mypopup","width=600,height=450")',T:'Menu item text'}
You also don't need to set the target "newWindow" for the item.