Please note that JavaScript is currently only available in Netscape Navigator 2.0 or higher.
Do not assume that all in your audience are using a JavaScript enabled browser.
This short JavaScript lets you open a file in a new window - you can also specify the size of the window and if the toolbar and other parts of the windows user interface should be displayed.
We use it to create a small remote control that will let you choose beetween some of the JavaScript Examples included with PageSpinner. The source of the remote control page is in the remote.html.
Since the window size is specified in pixels, it is recommended to use a table with a preset size in pixels or images as the contents of the page. In our example we can't be sure that the full table will be visible in the window, so we choose to let the scrollbars be visible, but disables most other user-interface parts of the window.
Open
Remote Control page.
How to use:
Use code similar to this to let the user display the window by clicking on a link:
Remote Control page. Use code similar to this to let the user display the window by clicking on a button:Change the setting of the window options by editing the text, most options accepts the values yes or no. The following options and values can be specified when opening a new window:
- toolbar[=yes|no]|[=1|0]
- location[=yes|no]|[=1|0]
- directories[=yes|no]|[=1|0]
- status[=yes|no]|[=1|0]
- menubar[=yes|no]|[=1|0]
- scrollbars[=yes|no]|[=1|0]
- resizable[=yes|no]|[=1|0]
- width=pixels
- height=pixels
Replace the filename,
"remote.html"
, with the name of the page that contains your remote control. You can of course put other contents in the window that is opened, e.g., a guided tour of your site, (see the autoload example) or you can use it as status window.Please note that some browser, like Navigator 3.0, will not use all specified options.