Overview

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

You can change this behavior and have the HTML5 client to open in the same browser tab as the Web logon page by modifying a JavaScript file.

Modifying the common.js file

Edit the file “common.js” file which is stored into the “C:\Program Files (x86)\RDPLUS\Clients\www\software” folder. As you will be modifying a plain text file, use a text editor such as Notepad or Notepad++ (do not use Word).

Search for these lines:

if (cpwin != false) {
window.name = " " + k;
cpwin.name = k;
cpwin.location.replace(p);
} else {
window.name = " " + k;
var success = false;
if(window.open && window.navigator && navigator.userAgent && navigator.userAgent.match(" CriOS")) {
tmpwin = window.open(p, '_blank'); //Chrome needs _blank
tmpwin.name = k;
success = tmpwin;
} else if(window.open) {
success = window.open(p, k);
}

And replace them by those lines:

if (cpwin != false) {
window.name = " " + k;
location.href = p + '#';
cpwin.close();
cpwin = false;
} else {
window.name = " " + k;
location.href = p + '#';
cpwin.close();
cpwin = false;
var success = true;

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

Modifying the common_applications.js file

If you are using RDPlus Web Applications Portal feature, then you need to edit a second file. Edit the file “common_applications.js” file which is stored into the “C:\Program Files (x86)\RDPLUS\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:

if (childurl != ”) {
child = window.open(childurl, childname);
childrenWindows[childrenWindows.length] = child;
}

And replace them by those lines:

if (childurl != ”) {
location.href = childurl + ‘#’;
}

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

Next Section: Gateway Features