Jump to content

How to Prevent Page Reload and Refresh


Reinoso

Recommended Posts

Best to all,

Someone would have the kindness to tell me if it is possible to prevent unigui can refresh the page or go back in the browser.

For example if a user right click on the page get a phenomenon and one of the options is the go to product above, as if the user presses F5 the page is regargara I regresesando to the first form shown and would like to avoid this behavior. -

Since already Agradesco any help you can give me, thanks.

Link to comment
Share on other sites

No, it is not possible. Users always have control over browsers.

Just imagine otherwise - where scripts in web pages can block browser's UI or change it's behaviour. The internet will die in 24 hours.

 

If users want to press F5 or go back while working with your unigui app, this probably means that your interface is not intuitive and they are getting lost. Rethink your application design and/or working logic.

Link to comment
Share on other sites

You can't prevent "go back", "refresh", "realod", "close", ... totally (see answer of zilav).

 

But you can show a warning, which the user must confirm:

 

Put this code in UniMainForm.script:

onbeforeunload = function() { return "This will close the web app! Are you sure?"; };
Link to comment
Share on other sites

First of all, Thanks for Reply, both the user zilav as Oliver Morsch and other viewing this topic.

The idea is to remove some options to prevent the user from making the slightest error, such that the user would control just exit the application by pressing the exit button because if you get to refresh the window will return to the login system and maybe the user is not interested in going there.

For the moment the solution proves Oliver Morsch

thanks

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...