Scripts: Javascript

Open Windows

The following shows how to use javascript to open a window with set width, height etc using the window.open function:

window.open(URL,'windowName','listOfAttributes')

Open a window (The opened window can be closed using the self.close(); function.)

<A HREF="JavaScript:;" onClick="window.open('open_window_window.html','windowName','toolbar=no,
location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=550,
height=300')">Open a window</A>

Note: The full screen mode is useful for photo galleries etc, where you need to make full use of the browser window. However, make sure you put a 'close window' link in the window at the menu bar etc disapears when using this function (see my photo gallery for an example).