blocking browser back button

  1. 2 weeks ago

    dave d

    May 7 Pre-Release Testers, Xojo Pro Australia

    I still have a lot of users hitting back in the browser to go to a previous page. If I recall there was some code posted to block the back button or popup a message to ask them if they really want to do it. For the life of me I cannot find it. Anyone know?

    Dave

    I think its to do with this

    <script type="text/javascript" >
    function preventBack(){window.history.forward();}
    setTimeout("preventBack()", 0);
    window.onunload=function(){null};
    </script>

  2. Paul L

    May 7 Xojo Inc http://docs.xojo.com

    I think you want this:

    https://docs.xojo.com/WebSession.ConfirmMessage

or Sign Up to reply!