Page 1 of 1

Preventing exit pop for internal

Posted: Fri Feb 05, 2010 9:19 pm
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?