CodeLifter.com
S
oftware & S
cripts by CodeBrain.com
Home
JavaScripts
PopUp Maker
-
po
pup wind
ows
CodeLifter 5
-
source viewer
ScrollBar Styler
-
color scrol
lbars
Flash Fixer
-
rem
ove al
erts
Roll-Over Maker
-
image roll-overs
Link Cloaker 5
-
enc
rypt links
Site Capture 3
-
hidden frames
CHMOD 2 Utility
-
chmod utility
BlackBird 3.0
-
browser shell
Zoom 1.0
-
magnifier
MicroTicker.com
-
text scroller
CodeBrain.com
-
j
ava app
lets
BrainCode.com
-
j
ava app
lets
MailToProtector
-
protect email
Java Applets
Perl Scripts
Affiliate Program
Index
Popup Window from Hell
Re-opens until link is clicked
Index
Open Popup
Window
( sample )
Click
here
to select the code in the window below.
Use Ctrl+C to copy it to your clipboard.
============================================================ Script: Popup Window from Hell Functions: This short, easy script set launches a window that continually re-opens itself and cannot be permanently closed *unless* the visitor clicks on a link that you provide. Browsers: NS6, IE4-6 (degrades gracefully in older browsers) Author: etLux ============================================================ INSTRUCTIONS: There are several steps to this, but all the scripts are short and easy. ============================================================ Step 1. Launching the Popup... You can launch the popup any way you wish; however, it's best to use the script below in the <head> ... <head> of the page. Set the various window.open parameters for the features, size, position, etc., that you need. Set theUrl to that of the popup page. Take care to get the entire line reWin=window.open(...) on a single line. <script> // (C) 2001-2003 by CodeLifter.com // Free for all users, but leave in this header // set the url of the page to open in the popup window theUrl="thePopupPage.html" function doThePopUp(){ reWin=window.open(theUrl,'hell','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=200,height=300,top=100,left=100') } </script> Launch the popup like this: <a href="javascript:doThePopUp()">Open Popup</a> ============================================================ Step 2. Placing the Script in the Popup Window... Put this script in the <head> ... <head> of the popup page. Set the various window.open parameters for the features, size, position, etc., that you need. Set theUrl to that of the popup page. Take care to get the reWin=window.open(...) on a single line. <script> // (C) 2001 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header theUrl = 'thePopupPage.html' lockU = 1 function doAgain(){ if (lockU == 1){ reWin=window.open(theUrl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=200,height=300,top=100,left=100') } } </script> ============================================================ Step 3. Activating the Script in the Popup Window Add the following onunload function call to the &body> tag in the popup page, as shown: ============================================================ Step 4. IMPORTANT Setting the Link to Close the Popup Window Caution: Be sure to include this or there will be no way for your visitor to close the window! <a href="javascript:lockU=0;self.close()">Close This</a> ============================================================
Get The Code!
CodeLifter is a
CodeBrain.com
Sister Site
©1995 - 2012 OEC Corp & CodeLifter.com
CodeLifter™ & CodeBrain™
Legal Notices
CodeBrain InterNET Group
BrainCode.com
CodeFoot.com
CodeBelly.com
Droiddd.com
etLux.com
FFFast.com
TrayApps.com
PopUpWorks.com
MicroTicker.com
DavidSosnowski.com
OECCorp.com
MailToProtector.com
CodeBrain.com
Free MUSIC!
Contemporary classical music, completely free.