locked
onbeforeunload on IEMobile RRS feed

  • Question

  • User-1075329537 posted

    Does anybody has idea onbeforeunload work on IEMobile or not. I tested this but sounds like does not work.Need more comment please.

    Thanks in advance,

    Suresh

    Thursday, October 2, 2008 3:59 PM

Answers

  • User-2060689755 posted

    Hi suresh,

    Pocket IE support onbeforeunload event, onbeforeunload will fire when refresh,back the page. I have tried a sample, it works fine in my local.

    <html>
    <head>


    </script>
    </head>
    <body>
    <div id="board"></div>

     </body>


    <script type="text/javascript">

    window.onbeforeunload = function(e){
      return 'leave or stay';
    }
    window.onunload = function(){
      alert('onunload');
    }
    //]]></script>
    </html>

     

    Best regards,
    Guang-Ming Bian - MSFT

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 8, 2008 5:29 AM

All replies

  • User-2060689755 posted

    Hi suresh,

    Pocket IE support onbeforeunload event, onbeforeunload will fire when refresh,back the page. I have tried a sample, it works fine in my local.

    <html>
    <head>


    </script>
    </head>
    <body>
    <div id="board"></div>

     </body>


    <script type="text/javascript">

    window.onbeforeunload = function(e){
      return 'leave or stay';
    }
    window.onunload = function(){
      alert('onunload');
    }
    //]]></script>
    </html>

     

    Best regards,
    Guang-Ming Bian - MSFT

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 8, 2008 5:29 AM
  • User-1075329537 posted

     Well i tryed above did not work,are you pointing to WM5 or WM6,I am not sure about WM6 but it doesnot work on WM5.

    Anything i am missing ?

     

    Suresh Behera

    Tuesday, November 4, 2008 5:50 PM
  • User1634317999 posted

    Hello,

    the window object of Internet Explorer Mobile, Windows Mobile Mobile 5, 6 and 6.1, doesn't have the onbeforeunload event. Only the onunload event is supported.

    Wednesday, November 5, 2008 1:18 AM