|
JavaScript Popup WindowsPopup windows are additional browser window opened from a web page. The popups are opened programmatically using JavaScript. JavaScript Popup windows are used widely for displaying advertisements. It is a proven method of generating good income from a website. Uses of Popup Windows
In general the following are the ways to utilize popup windows:
Note: Invocation methods
The invocation of the Popup is dependant on the purpose of the Popup window.
A help popup window could be opened when the user clicks on a 'help' link.
Based on the invocation method, Popups are of the following types: Creating a JavaScript Popup windowIn order to invoke the popup window at certain instances (like when the page is loading) you need to understand the event handling. For example, if you want to popup a window when the user visits a page, you need to handle the onLoad event of that page. The following section event handling. The code below handles the onLoad event and displays a message.
The event handler is added in the onLoad event of the <BODY> tag of the page. Similarly, the following code shows the handler for the unload event.
Suppose you want to handle the event when the user clicks on a link. The following code shows handling the click on an anchor
The next section shows in detail, the code for opening a window.
|
|
. Copyright © 2003-2009 JavaScript-coder.com. All rights reserved. |
||