Results 1 to 2 of 2

Thread: On exit code question

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question On exit code question

    I been using a great little code that loads a page in the same window on exit. I just put onclick="xit=false" to stop the script when they click on a link on the page. BUT... How do you keep it from loading if someone clicks on a adsense ad?

    Here's the script code...

    Code:
    <body onUnload=xit()>
    <script language="JavaScript" type="text/JavaScript">
    
    function xit() {
    
    window.location="http://domain.com";
    
    }
    
    </script>
    Is there any way that the adsense block and this code can get along????

    Thanks for any help you can offer.

  2. #2
    Join Date
    Dec 2005
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <script language="JavaScript" type="text/JavaScript">

    function xit() {

    return false;
    window.location="http://domain.com";

    }

    </script>

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
  •