close the Logon form after logon

Overview

On the Web logon page, when the user clicks on the “Log on” button, the chosen client (HTML5 or Windows) is opened in a new browser’s tab.

Sometimes, and more specifically when using the Windows client, you might want to hide the logon form to the user, for instance in order to avoid the user to click again on the “Log-on” button.

Depending on the Internet browser used, you have two choices on how to change this default behavior. Both solutions requires you to modify a JavaScript file.

Solution A: Closing the Logon tab - For Internet Explorer only

In this solution, when the user clicks on the “Log on” button, the chosen client will be opened in a new browser’s tab and the Logon tab will close itself. Depending on the Internet Explorer version, a small message window might be displayed to the user, asking him to confirm that he wants to close this tab.

Edit the file “common.js” file which is stored into the “C:\Program Files (x86)\TSplus\Clients\www\software” folder. We advise you to use a text editor such as Notepad or Notepad++ (do not use Word).

Search for these lines:

p = 'software/remoteapp.html';
window.name = " " + window.opforfalse;
if (cpwin != false) {
    cpwin.name = window.opforfalse;
    cpwin.location.replace(hostGateway + jwtsclickLinkBefore(getside(), p));
} else {
    window.open(hostGateway + jwtsclickLinkBefore(getside(), p), window.opforfalse);
}

And replace them by those lines:

p = 'software/remoteapp.html';
window.name = " " + window.opforfalse;
if (cpwin != false) {
    cpwin.name = window.opforfalse;
    cpwin.location.replace(hostGateway + jwtsclickLinkBefore(getside(), p));
} else {
    window.open(hostGateway + jwtsclickLinkBefore(getside(), p), window.opforfalse);
}
window.open('','_parent','');
window.close();

We recommend you clear your browser’s cache after saving the changed JavaScript file.

Solution B: Redirecting the Logon tab to another web page - For all browsers

In this solution, when the user clicks on the “Log on” button, the chosen client will be opened in a new browser’s tab and the Logon tab will automatically navigate to another web page.

You are free to use any existing Internet address (URL) such as “http://google.com” or “http://your_intranet/your/page.html”, or you can create your own web page by using “thankyou.html” as the URL and creating a file named “thankyou.html” in the “C:\Program Files (x86)\TSplus\Clients\www” folder and putting HTML content in it.

Edit the file “common.js” file which is stored into the “C:\Program Files (x86)\TSplus\Clients\www\software” folder. We advise you to use a text editor such as Notepad or Notepad++ (do not use Word).

Search for these lines:

p = 'software/remoteapp.html';
window.name = " " + window.opforfalse;
if (cpwin != false) {
    cpwin.name = window.opforfalse;
    cpwin.location.replace(hostGateway + jwtsclickLinkBefore(getside(), p));
} else {
    window.open(hostGateway + jwtsclickLinkBefore(getside(), p), window.opforfalse);
}

And replace them by those lines:

p = 'software/remoteapp.html';
window.name = " " + window.opforfalse;
if (cpwin != false) {
    cpwin.name = window.opforfalse;
    cpwin.location.replace(hostGateway + jwtsclickLinkBefore(getside(), p));
} else {
    window.open(hostGateway + jwtsclickLinkBefore(getside(), p), window.opforfalse);
}
window.location.href = "http://google.com";

We recommend you clear your browser’s cache after saving the changed JavaScript file.