Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can anybody help me with the below code. I was using the below code for clearing the user session by a click on a button.
function clearSession()
{
($("#nb_logout").click(function () {
var logoutURL = (config.isSecure ? "https://" : "http://") + config.host + (config.port ? ":" + config.port : "") + config.prefix + "qps/user";
$.ajax({
type: "DELETE",
url: "http://kr.ks.kt.com/qlikview/Login.htm",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
//var names = response.d;
//var homeURL = (config.isSecure ? "https://" : "http://") + config.host + (config.port ? ":" + config.port : "") + config.prefix + "extensions/Overview/Overview.html";
//console.log("Please relogin...");
window.location = "http://kr.ks.kt.com/qlikview/Login.htm";
},
failure: function (response) {
alert(response);
}
});
}));
}
Please let me know what is wrong with the above code. i have posted the exact code except the domain name
Perhaps this extension helps: Document Extension to Terminate an AJAX Session | Qlik Community
Thanks for the reply Gysbert.
In our case we need so many approvals for using the extensions so that will cause more delay. Can we have a javascript function called from a text object or button.
Sure. That's possible. Simply write your macros in javascript instead of vbscript. Then add an Execute Macro action to your text box or button.
Will a javascript macro have access to the DOM?
$.ajax(
-Rob
I doubt it. But looking at the code of this extension it might be possible to open the document url with "&close=true" appended to the url to get the required result.
There is already a "Close" link on the browser screen. Will that do what you want?
-Rob