Preventing exit pop for internal

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Preventing exit pop for internal

Post by GeXus »

I have the following code:

Code: Select all

 
    function regularChatDisplay() {
            alert("Wait..."); 
            return "\n\nPress 'CANCEL' below to chat...\n\n";
            }
    }
    
    window.onbeforeunload = regularChatDisplay;
 
I don't want the code to show when internal links are clicked however. I've tried things like adding click events to the links, and if it's set, don't show.. but it doesn't seem to work.. any suggestions?
Post Reply