Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Window Help

  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Window Help

    I have need to check if the user has clicked the "X" on the top right of the window to close it.

    basicly what I want is

    if windowwasclose = true
    dostuff()
    else
    dosomethingelse()

    Any Suggestions
    Last edited by mushand; 12-14-2007 at 05:56 PM. Reason: didn't finish

  • #2
    New Coder
    Join Date
    Jun 2005
    Posts
    52
    Thanks
    0
    Thanked 4 Times in 4 Posts
    You can use "onunload" event handler... or listeners...

    window.onunload = function () { /* do stuffs... */ }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •