Hi Guys,
If you just want to create a button to be able to change the user logged in viewON, you can use this viewON Script/Javascript.
This will force the logoff of the current user and prompt for new credentials
If you just want to create a button to be able to change the user logged in viewON, you can use this viewON Script/Javascript.
This will force the logoff of the current user and prompt for new credentials
Code:
var d = '111111111111',
hostParts = window.location.href.split('/');
url = hostParts[0] + '//'+d+':'+d+'@';
if (window.location.href.indexOf("m2web.talk2m.com") > -1)
url += hostParts[2] + '/' + hostParts[3] + '/' + hostParts[4] +'/Ast/MainAst.shtm?nocache='+(new Date().getTime());
else
url += hostParts[2] + '/Ast/MainAst.shtm?nocache='+(new Date().getTime());
$.ajax(
{
type: "get",
url: url,
timeout: 15000,
error: function(jqXHR, status)
{
window.location.href = '../../usr/login.html';
},
// should not occur
success: function(jqXHR, status)
{
window.location.href = '../../usr/login.html';
}
});


