Md Kamruzzaman
Md Kamruzzaman

Reputation: 7

Stop or Disable browser Refresh button in javascript

I work in Ext JS. in Ext JS webdesktop application , when i click browser refresh button it reload and goes to login window. Because my first page is login. For this reason i need to stop this event or disable browser refresh button when this application launch. i can stop F5 but can't browser refresh button. So please some one help me for this issue. Thanks...

Upvotes: 0

Views: 877

Answers (1)

Thomas
Thomas

Reputation: 3593

No, wrong issue

You have to memorize the current View he is in. As far as i remember, Ext has mechanisms for that, otherwise you can still use a (session-)cooke.

and you don't have to start you application with the login-screen. It is just one view, and imo. the one you would want to use as few as possible.

So. on page load, check wether he is logged in, if no, show him the login-view, if yes check which view he was in and render it, otherwise send him to the start point.

this is basically the loop you have to send him through, on pageload, on refresh, onlogin, ...

Upvotes: 2

Related Questions