<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT: 10pt verdana; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" 
bgColor=#ffffff>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp;&nbsp;&nbsp; Isn't that usually what porn sites do? 
(I've only heard...)</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp;&nbsp;&nbsp; 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&nbsp;it did, would the users really want that?</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>&nbsp;&nbsp;&nbsp; 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.&nbsp; You could probably store your domain/IP 
in client-side variables and&nbsp;check the destination in your onUnload -- 
you'd probably need to experiment to see&nbsp;what property 
(e.g.&nbsp;window.history(1), window.location.href, etc) holds the upcoming URL 
-- but this will still be sketchy in terms of its effectiveness.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Just some random musings...</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=DonM@allensysgroup.com href="mailto:DonM@allensysgroup.com">Don 
  Makoviney</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu 
  href="mailto:'javascript@LaTech.edu'">'javascript@LaTech.edu'</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 21, 2001 8:12 AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] pop-up window when 
  a user leaves</DIV>
  <DIV><FONT face=Arial></FONT><BR></DIV>
  <DIV><FONT size=2>
  <P>I want to have a pop-up window come up when a user leaves my website.</P>
  <P>I have found several scripts that work when a user leaves a "page", but 
  I</P>
  <P>only want the pop-up to come up when they leave the "site".</P>
  <P>Know what I mean?</P>
  <P>Can anyone point me to a script for that?</P>
  <P>An example:</P>
  <P>Go over to fortune.com. . . .view an</P>
  <P>article. . . .then try and go to another site, like Yahoo or something. 
  At</P>
  <P>that point the site determines that you are leaving and instantiates a</P>
  <P>pop-up window.</P>
  <P>Any ideas? I am thinking that using ASP I can check the new domain or IP 
  out</P>
  <P>and see if it matches my IP. If not, then do an onunload popup.</P>
  <P>Any other ideas would be much appreciated.</P>
  <P><FONT face=Arial></FONT>&nbsp;</P>
  <P>Thanks,</P>
  <P>DM</P></FONT></DIV></BLOCKQUOTE></BODY></HTML>