SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question javascript window closing

    javascript

    --------------------------------------------------------------------------------

    Hi every one,

    Please let me know to execute specific javascript code when the browser is exiting.
    When a browser is closed i want some code to display images or text to be executed. Please help me. Thanks.
    Ram.

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi!
    maybe u need the onUnload event?

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    onunload

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    body onunload="bla()" lol
    ok now
    Last edited by reminder; Jan 31, 2005 at 06:44.

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    window.onunload = someFunction;
    </script>
    </head>
    <body>

    </body>

  6. #6
    SitePoint Member
    Join Date
    Jan 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on unload will gets fired even when i move to next page also. I want the code to be executed when i close the Browser (on top right corner)

  7. #7
    SitePoint Member
    Join Date
    Jan 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by reminder
    hi!
    maybe u need the onUnload event?
    on unload will gets fired even when i move to next page also. I want the code to be executed when i close the Browser (on top right corner)


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
  •