Results 1 to 3 of 3

Thread: x - shut down the window

  1. #1
    Join Date
    Sep 2007
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry x - shut down the window

    i started to use onunload="displayContent00()"
    but than i realized that it not shoots only when the user click on X
    but it shoots every time page being refreshed or skiping to another page too...
    can someone help me solve this one?
    i need something that shoots only when the window being closed with the X

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    PLEASE: Include the URL to your problematic webpage that you want help with.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't think there is a window.onunloadOnlyFromX() method or anyway to determine that the window is being closed as opposed to simply the page being unloaded. Even with onunload, different browser see it differently, firing it only under certain circumstances.
    Last edited by jscheuer1; 10-31-2007 at 07:44 AM. Reason: punctuation
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •