Browser Close onUserExit.js

Discussion in 'Software' started by KumarHarsh, Sep 4, 2009.

  1. KumarHarsh

    KumarHarsh

    Joined:
    Sep 4, 2009
    Messages:
    1
    Likes Received:
    0
    Hi,

    This is with reference to
    onUserExit jQuery Plugin
    I want to use onUserExit.js
    But exactly i am unable to implement.
    My requirement is to know when user close the browser.
    How do I know this with minimum effort.
    I am using asp.net 2.0 and master page.

    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.url.packed.js"></script>
    <script type="text/javascript" src="js/onUserExit.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $().onUserExit({
    execute: function()
    {
    alert("This alert was executed upon you leaving this page to another website, or when you closed the browser!");
    },
    internalURLs: "creations.userfirstinteractive.com ";
    });

    });

    </script>

    Now,How do I know when user close the browser.
    The alert fire everytime when there is page postback.
    Where to modify code ?
    Those who have use this will be able to help me


    Thanks
     
    KumarHarsh, Sep 4, 2009
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.