ssnaphade 0 Newbie Poster

Hi dudes,

I want to get a browser close event(X) in firefox browser.

My Requirement:

I have code for the same but it's works only in IE not in Mozilla.
Application should alert me when browser close not for refresh page or navigate one page to another n it's should be work on mozilla.

Following code works in IE but not in Mozilla.

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

        window.onbeforeunload = function() {
            if ((window.event.clientX < 0) || (window.event.clientY < 0) || (window.event.clientX < -80)) {
                
                //Code
            }
        };

    </script>

Please help me.

Thanks In Advance
Satish

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.