- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 08:51 AM
Hi,
Can you please provide steps to create popup window with a message after logging in to instance?
Similar like this one: https://www.servicenowguru.com/system-definition/login-terms-conditions-dialog/
Thanks,
Ashraf
Solved! Go to Solution.
- Labels:
-
Script Debugger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 02:46 PM
I have added a check so it will not run on login page. And changed to session variable so it will trigger each new login:
addLoadEvent(function () {
var session = gs.getSession();
if (session.getClientData('popup_triggered')) {
return;
}
if ((window.name !== 'gsft_main') || (window.parent.document.URL.indexOf("login.do") > -1)) {
console.log("Prevent popup in this window or on this page.");
return;
}
session.putClientData('popup_triggered', 'true');
//Ensure that we call the dialog for the correct frame
if (window.frameElement) {
if (window.frameElement.id == 'gsft_main') {
showTerms();
}
}
else if (!window.frameElement) {
if (!$('gsft_main')) {
showTerms();
}
}
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:20 AM
I have created an article about this. I think it works correct now:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 05:51 AM