The aim of this article is to pop-up a second window when our page
loads. We will be doing this be modifying the
tag in
the page and using the onLoad() parameter. For clarity, and to
permit easy eapansion of the code in the future, we shall call a
JavaScript function called thisIsOnload().
Firstly modify the
tag:
Now add the following into the
part of the page, before the closing tag.
In the above I have assumed that our popup window page is located in
the root directory of our website and that its name is popup.html.
We can improve the opening of our popup window by setting the size,
turning off the decoration of the window. To do this change we
shall change our javascript code:
One last nicety to add to your popup window. Lets add the word
close, which when clicked will close our popup window. For this
add the following at the bottom of the page.
Close
| This article viewed: 1217 times | Back |
Copyright © 2004-2007 Janet Systems Ltd.