Results 1 to 3 of 3

Thread: Preventing a browser window/page from closing

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    7
    Hi Guys,

    How do u do this?
    I'v got a page loaded and showing. When I'm closing
    the window or moving to another page, I should
    check for some values and based on the values
    the page should not be unloaded or the window
    should not be closed.

    I want a functionality similar to the queryunload event
    in VB where u can prevent a form from closing if
    u return a value to the CANCEL parameter.

    Can u guys help me out with this ?

  2. #2
    Guest
    You could open a new instance of your window when the person closes IE or navigates to another site.


    PHP Code:
    <body onUnload="window.open(window.location)"

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    7

    Smile Thanks buddy...

    Ok buddy. Thank u.
    But can't u prevent the window/page from closing
    rather than reloading it again because i'v got a lot
    of values to be populated on that page ?

Posting Permissions

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



Click Here to Expand Forum to Full Width