SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: On exit script

  1. #1
    SitePoint Member emailx's Avatar
    Join Date
    May 2001
    Location
    United States
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    I'm looking for an on exit script, so when someone leaves my site a window pops up as they leave. Could someone please give me the code or a link to where I can it. Thanks
    Sean sean@emailx.net
    Get FREE email at www.emailx.net

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <body onUnload="blah()">

  3. #3
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eww... this kind of thing is EXTREMELY irritating (I hate sites that do that, they always strike me as unprofessional) but if you really must:
    Code:
    <script language="javascript">
    function leave() {
    window.open('http://www.whatever.com/page.html','','toolbar=no,menubar=no,location=no,height=300,width=500');
    }
    -->
    </script>
    Stick that in your page header, then make sure your body tag contains something like this:
    Code:
    <body onUnload="leave()">
    This kind of question should really be asked on the "Client Side Scripting" forum. A good place to get irritating bits of javascript () is www.javascriptsource.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •