Milonic Home Page Information and Benefits of Milonic Products Some Samples of DHTML and JavaScript Products Download DHTML Menu Purchase Milonic JavaScript DHTML Products Tech Support Contact Milonic
Member Login - Search: Sitemap
Current Menu Version: 5.955 dated Sunday April 14 2024 Click to Download
Opening Windows and Frames with the Menu

Opening Windows and Frames with the Menu
When opening new windows you can either press CTRL+N to open a new window or you can press SHIFT and click on the link either in the menu or on a standard link in your web page. You can also force this behaviour in any of the menu items in your menu by adding a target. An example of this can be seen here.

aI("text=Open Google in New Window;url=;target=_blank");

The above menu item sample will create a new instance of your browser and automatically navigate to the web site you have declared in your menu item text string. You can also replace the target with _new or the name of a frame.

You can even take this step further and open a customized browser instance with control over the following browser properties

  • height=300 - Windows Outer Width in Pixels
  • width=300 - Window Outer Width in Pixels
  • toolbar - "Back", "Forward" and other buttons
  • location=yes - Show Current URL
  • directories - Show What's new and other buttons
  • status - Show the status bar
  • menubar - Display the browser menu bar
  • scrollbars - Use scrollbars if needed
  • resizable - Include user re-sizing of Window
  • copyhistory - Duplicate the GO history

This feature is included within the menu and is controlled by the targetfeatures property in your menu item.

If you wanted to open a new browser window for a specified link but limit the size to 300 pixels wide by 300 pixels high, you would declare a menuitem like this:

aI("text=Open Google;url=;target=windowname; targetfeatures=width=300,height=300");

The above menu item will open a new browser window to This window will contain no scroll bars, location bars, status bars, menus or the ability to resize the window. This is the blank state of a browser window.

If you needed to add features to the above window you would do this by adding them to the targetfeatures property. For example, if you wanted the same size window for Google, as in the above sample, but you also wanted the ability to resize the window. Plus, you wanted the status bar to appear and you wanted to be able to scroll the window you can add these parameters to the targetfeatures property. The menu item would then look something like this:

aI("text=Open Google;url=;target=windowname; targetfeatures=width=300,height=300,status,scrollbars,resizable");

The above principle applies to all other window opening properties (from the list above) when opening windows using this technique. If you omit the targetfeatures property the standard browser will load as though you had selected it by clicking on an icon on your desktop.

In order to open the menu in an IFRAME you will need a custom JavaScript function. This function is very easy to integrate but it must be used in conjunction with the menu because it uses built in menu functions to get a reference to the IFRAME . Please note that at this stage this will not work for Netscape 4.x - Netscape 4.x does not support IFRAMES but you can have similar IFRAME functionality by using Layers. We will create a sample for Netscape 4.x at a later date. Please let us know if you need a sample for Netscape 4.x now and we can send you at least a workaround.

The function is called openIframe and it's parameters are IFrameID and URL

function openIFrame(IFrameID, URL){
ifId.location.href=URL // Opera Bug Fix. ifId.src=URL

You must have an IFrame embeded in your HTML for the above function to work. You must also give the IFrame an id that will be it's reference in order to change the URL. The menuitem for changing the URL of your IFrame will need to look something like this:

aI("text=Open Google in IFrame;url=javascript:openIFrame('tempiframe',''")

  • Dynamic Downloads are possible for the Opening Windows and Frames _H_T_I_W_ the Menu demo
  • The code for this menu sample will be generated on the fly and compiled into a .ZIP file format for downloading onto your own machine.

Click here to download this sample

Note that you need to logged in to download the menus and the download delivered will depend on your current license status.

Purchase The Menu

Download DHTML Menu

See our list of Menu users

Milonic provide full featured pull down web menus for some of the worlds largest companies

Learn about how Milonic's DHTML menus can benefit your site

What does it cost? DHTML Menu prices

Who is using us?
Sample Client list

Bespoke menu design and build service from the Milonic team

Our bolt-on modules provide free optional extras for specialist projects

Free icons and images for all licensed users with our Menu Imagepack

What is Milonic up to at the moment? Check our blog