Delayed Popup Window
Delayed Popup Window
Delayed Popup Window |
Select all (ctrl ‘A’) the text script INSIDE of this text box directly below and copy it to your clipboard (ctrl ‘C’)
<head> <script language=”JAVASCRIPT”> function openSpawner(url,name) { </script> |
Open a your webpage that you want your popup to load in a program such as Wordpad or Notepad and paste the above text (ctrl ‘V’) in between the HEAD Tags of the document.
The head of your webpage should now look like the code directly below. Edit the RED text only to reflect the web address on the pop up window that will be displayed. <HEAD> <SCRIPT LANGUAGE=”JAVASCRIPT” > function openSpawner(url,name) { </SCRIPT> </HEAD> |
Now choose if you would like the popup window to display when your webpage opens or closes. If you would like the popup to load when your website is FIRST visited copy this line into the <BODY tag of your document.
<Body onLoad=”openSpawner();self.blur()” ENTERS Page If you would like the popup to load when your website is LEFT by the visitor copy this line into the <BODY tag of your document. <Body unLoad=”openSpawner();self.blur()” EXITS PAGE |
|
Now create a page called hidden_popup.html and paste the following in between the Body tags of the document. The body tags are what tells the web browser what the visitor can see:
<script language=”javascript”> //### array setup – leave this alone var pURL = new Array(); //### configure your popups here ### //### URLs of the Popup Windows ### pURL[0] = “http://www.address1.com”; //### Name of the Popup Windows. If you choose the same name, it will //### Height of popup ### //### Width of popup #### //###position of popup. Options: center, random, base (0,0) ### //### seconds that will lapse before window pops up ### //<— don’t edit any code below —>// var win=null; for(var npop in pURL){ </script> |
As with the Head Code, Edit only the RED for your information that you want the script to do.
<script language=javascript> //### array setup – leave this alone var pURL = new Array(); //### configure your popups here ### //### URLs of the Popup Windows ### pURL[0] = “http://www.address1.com”; //### Name of the Popup Windows. If you choose the same name, it will //### Height of popup ### //### Width of popup #### //###position of popup. Options: center, random, base (0,0) ### //### seconds that will lapse before window pops up ### //<— don’t edit any code below —>// var win=null; for(var npop in pURL){ </script> |
After you have embedded the Head script into your page that you want to load your hidden popup from and after you have created your hidden popup page and edited your information, you are ready to upload your pages!
Enjoy! |