10-11-2019, 05:36 PM
I have recently upgraded from IW12 to 15 in Delphi 2010, and have sadly lost a brilliant piece of functionality - I have the following bit of JavaScript included in the header of each of my pages (using the ExtraHeader property) to prevent people from using the back button
<script type="text/javascript" >
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
It wasn't *perfect*, as it could be bypassed with sufficient user investment, but it was pretty damned handy, and worked in every browser we tried it with. Unfortunately, after upgrading to IW15, the code is still appearing in the page headers but it doesn't appear to work at all. The built-in replacement from Intraweb (BackButtonOptions,mode = bmInterceptGlobal) sadly doesn't seem to be functional either in Chrome or Edge, although it is at least working in IE.
Does anyone have any idea why the above script would have stopped working between versions?
<script type="text/javascript" >
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
It wasn't *perfect*, as it could be bypassed with sufficient user investment, but it was pretty damned handy, and worked in every browser we tried it with. Unfortunately, after upgrading to IW15, the code is still appearing in the page headers but it doesn't appear to work at all. The built-in replacement from Intraweb (BackButtonOptions,mode = bmInterceptGlobal) sadly doesn't seem to be functional either in Chrome or Edge, although it is at least working in IE.
Does anyone have any idea why the above script would have stopped working between versions?