I want to disable back and front button of browsers. I have tried with the following code and Iam using onload for div tag and div tag id is order.
<script type="text/javascript">
$(document).ready(function() {
var back= noback();
$("#order").load("back");
function noback() {
window.history.forward(-1);
alert('backbtn');
}
setTimeout("noback()", 0);
alert('loading');
});
</script>
When i tested, alert backbtn is working fine but i can navigate to back page. Please help me how to make disable those buttons.