0

How to disable back/forward browser buttons?

asked 2013-04-02 18:34:29 +0800

nilsonhp gravatar image nilsonhp
123 3

updated 2013-04-06 16:46:16 +0800

Hi, everyone.

Simply, i need to disable the back/forward browser button events, so they will do nothing. How can i do this?

Thanks

Nilsonhp

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-04-04 12:17:34 +0800

mujawarv gravatar image mujawarv flag of India
45 4

updated 2013-04-04 12:21:08 +0800

used this script : --

    <![CDATA[
    (function($) {
    $.fn.extend({
    disableBackKey: function() {
    $(window.document).keydown(disableBackInnerFunc);
    }
    });

    function disableBackInnerFunc(event) {
    var e;
    if ($.browser.msie) { e = window.event; } else { e = event; }
    var elid = $(document.activeElement).is('input[type="text"]:focus, textarea:focus');
    if (e.keyCode == 8 && !elid) { return false; }
    };
    })(jQuery);
    $.fn.disableBackKey();
    ]]>
link publish delete flag offensive edit
1

answered 2013-04-03 06:29:04 +0800

Jonson1 gravatar image Jonson1
19 1
http://www.techsupporthou...

how to disable back and forward and refresh in javascript,need code for this ?

As we always say: No can do! You can hide the tool bar, but they always have the control arrow keys,

you can use this: but you are not actually disabling it. You can use a meta tag to disable the page if it has be refreshed, but that is about all. You can search the forums and see this has been discused many times Eric

link publish delete flag offensive edit
0

answered 2013-04-06 16:45:48 +0800

nilsonhp gravatar image nilsonhp
123 3

Thanks a Lot for the answer...

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
3 followers

RSS

Stats

Asked: 2013-04-02 18:34:29 +0800

Seen: 70 times

Last updated: Apr 06 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More