Loading ...
Sorry, an error occurred while loading the content.
 

How do i know weather current window is going to close in javascript

Expand Messages
  • bhavna_coolinus
    Hi , Can any one tell me using which event we can know weather web page is going to close. I need to refresh my page continuous on the server its containing
    Message 1 of 1 , Jul 20, 2007
      Hi ,

      Can any one tell me using which event we can know weather web page
      is going to close.

      I need to refresh my page continuous on the server its containing
      some background process, But when any one try to close this page I
      have make confirmation before closin page, for this I got one
      solution that is if i use onbeforeunload event of <body>

      But my problem is if i call any function onbeforeunload i have to
      chek weather page has been refreshed or closed. if refresh then let
      it be continuw but on close i want to restrict the user.


      If need some help of javascript experts. please let me know if
      anybody can help me out on this problem or any new suggetion other
      than onbeforeunload event.


      Thanks in advance,
      Bhavna.
    Your message has been successfully submitted and would be delivered to recipients shortly.