For example, if you have a page of product images and Item numbers you can make them link to a “Pop-up” window with the item details.
Place this first bit of code in the head of the document that will be calling the new window.
version = parseInt(navigator.appVersion)
if (version >= 4) window.print()
This is where we define the properties of the new window that will be created. We define a width of 450 pixels and a height of 500 pixels. This can be set however large/small you need it.
Then we say we allow scroll bars (in case our content goes beyond the new window size), and we allow the window to be re-sized.
Here are some of the features that we can use to define our windows:
- channelmode – Specifies if window should be opened in channel mode. IE only.
- fullscreen – Specifies if window should be opened in full screen mode. IE only.
- height – Specifies the height of the window.
- left – Specifies the x coordinates of the window in pixels. IE only.
- location – Specifies if the location bar of the window should be included.
- menubar – Specifies if the menu bar of the window should be included.
- resizable – Specifies if window should be resizable.
- screenX – Specifies the x coordinates of the window in pixels. NS only.
- screenY – Specifies the y coordinates of the window in pixels. NS only. See “top” as well.
- scrollbars – Specifies if window should contain scrollbars.
- status – Specifies if the status bar of the window should be included.
- toolbar – Specifies if the toolbar of the window (ie: reload button) should be included.
- top – Specifies the y coordinates of the window in pixels. IE only.
- width – Specifies the width of the window.
Now, we call this new window by creating our link with the following information:
Note: the file name to be called must be enclosed in’ ‘.
© 2006 – 2009, Robert Owen. All rights reserved.