How to show a logout page after Application.Exit()

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
Answered
0
0

Hi
How to show a custom logout page (for example public home page or login page with new session) after Application.Exit().
Currently showing blank page (Firefox 48)

Thanks in advance

  • You must to post comments
Best Answer
0
0

When the application is terminated and the session is disposed Wisej client calls Wisej.onExit. The default implementation is window.close() – which doesn’t work in most browsers and the tab is not closed unless it’s the one created by VS in debug mode.

You can control what to do easily by adding your function. You can do it in Default.html:

<script>

 Wisej.onExit = function () {
   alert("Sorry, the app has been closed!");
   location.reload();
 };

</script>

The example above shows an alert and then reloads the application, in which case you’d get a new login form if your app starts like that. But you may navigate to a custom html page or anywhere else. You can even start a new different Wisej app, or pass custom arguments with the URL.

 

  • ARTURO ESTIGARRIBIA
    How do you implement the function Wisej.onExit?, Example: A button from a Window in Wisej, and then I want to logout from there… how do I implement that function?
  • Luca (ITG)
    Wisej.onExit() is not a function you call. It’s an event that is called by Wisej when the application is terminated. See post above. To terminate the current session call Application.Exit() on the server side. Logging out is up to your application and depends of what your app considers logging in.
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json