Results 1 to 3 of 3

Thread: Browser back button and refresh button in EXTJS application

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    43

    Default Answered: Browser back button and refresh button in EXTJS application

    Hi Forum,

    I would like to know how you guys have solved the issue that users of your application might click on the 'BACK' button in your application?

    We are creating an application where we need some means of preventing that the user e.g. clicks on 'BACK' in the browser in order to go back to a screen what is no longer valid (like order has already been processed)?

  2. Try using the "onbeforeunload" event.
    https://developer.mozilla.org/en-US/...onbeforeunload

    Add this to index.html:

    Code:
    <SCRIPT>
    window.onbeforeunload = function(e) {
        return 'Are you sure you want to leave the application?';
    };
    
    </SCRIPT>

  3. #2
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Answers
    4

    Default

    I think that you would have to create a browser extension of some sort.
    Other than that I don't think it is possible.

  4. #3
    Sencha Premium Member EPV's Avatar
    Join Date
    Dec 2010
    Location
    Sweden
    Posts
    361
    Answers
    37

    Default

    Try using the "onbeforeunload" event.
    https://developer.mozilla.org/en-US/...onbeforeunload

    Add this to index.html:

    Code:
    <SCRIPT>
    window.onbeforeunload = function(e) {
        return 'Are you sure you want to leave the application?';
    };
    
    </SCRIPT>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •