There is a very easy way of opening a second window and that is to do a normal link to a new page with the added clause in the link statement as TARGET="NEW"
- but then you have no control over the size of the window.
There is a problem that the surfer may not close the window after reading it, the second window remains open to confuse him later.

Or if you have an image you can show a small size version on the main page as a sample, and have the visitor click for a larger version. He will have to use BACK (or using IE use Backspace) to get back to the main page.

A better solution is to use JavaScript:
What this does is to open a second window of the size and content of your choice. There is still a problem that you should remind the surfer to close the window after reading it, otherwise the second window remains open to confuse you later. You can close it using the windows Close button, or using a special JavaScript prompt which is in the second window page and looks like this:
<form><input type="button" name="windem" value="Close"
onClick="window.close()"></form>
Click the magic button for a demo:
Or without using a button, and this time with a full page heading:
To call this link:
New Window

As an alternative, there is a second and simpler way
using the JavaScrip Alert function.
The window still has to be closed and will not let you do anything else
until you have closed it, but it does come back at the same point.
Try it here:


URL: http://www.waller.co.uk/java2.htm
|