[Javascript] pop-up window when a user leaves

Don Makoviney DonM at allensysgroup.com
Mon May 21 14:48:26 CDT 2001


Actually, alot of "reputable" sites do the same thing, including the FORTUNE
magazine site listed below.
 
DM

-----Original Message-----
From: Peter Brunone [mailto:peter at brunone.com]
Sent: Monday, May 21, 2001 11:31 AM
To: javascript at LaTech.edu
Subject: Re: [Javascript] pop-up window when a user leaves


 
    Isn't that usually what porn sites do? (I've only heard...)
 
    This pop-up doesn't always work (i.e. I can select a site from my
address bar without setting off the onUnload), but even if it did, would the
users really want that?
 
    Also, ASP wouldn't be much use for the off-site request, since your page
would be loaded and finished by the time the new "outside" page was
selected.  You could probably store your domain/IP in client-side variables
and check the destination in your onUnload -- you'd probably need to
experiment to see what property (e.g. window.history(1),
window.location.href, etc) holds the upcoming URL -- but this will still be
sketchy in terms of its effectiveness.
 
Just some random musings...
 
 

----- Original Message ----- 
From: Don  <mailto:DonM at allensysgroup.com> Makoviney 
To: 'javascript at LaTech.edu' <mailto:'javascript at LaTech.edu'>  
Sent: Monday, May 21, 2001 8:12 AM
Subject: [Javascript] pop-up window when a user leaves



I want to have a pop-up window come up when a user leaves my website.

I have found several scripts that work when a user leaves a "page", but I

only want the pop-up to come up when they leave the "site".

Know what I mean?

Can anyone point me to a script for that?

An example:

Go over to fortune.com. . . .view an

article. . . .then try and go to another site, like Yahoo or something. At

that point the site determines that you are leaving and instantiates a

pop-up window.

Any ideas? I am thinking that using ASP I can check the new domain or IP out

and see if it matches my IP. If not, then do an onunload popup.

Any other ideas would be much appreciated.

 

Thanks,

DM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010521/f4fab412/attachment.htm>


More information about the Javascript mailing list