consent popup on instance

June Anderson
Tera Contributor

I asked this question earlier but asked it wrong, wanted to update my question. please assist as I am yet to do any kind of content. This will be my first

 

 

 

I need to add a simple content pop-up to our production instance for when the user enters the URL, e.g. "www.servicenow.com" and hits enter, upon loading the page, they will receive a pop-up requesting them to accept the content. This should only happen once after the login to the instance and should not occur again throughout their section or when they open up another tab

 

The content should read something like the example below

 

" You are accessing a private property of company ABC that is provided for ABC- Authorized users only. By using this (which includes any device attached to this), you are consenting to the following conditions"

 

Thank you 

 

How can I configure this?  Detailed Steps will be appreciated as I am still transitioning into development 

11 REPLIES 11

Yousaf
Giga Sage

Hi June,

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();
        }
    }
});

 

Reference : Popup Message after logging in to instance

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

@June Anderson 

This didn't help?


***Mark Correct or Helpful if it helps.***

@Yousaf 

I am assuming this is an onload client script, what does this script do, where would I enter my message? I would like this popup to only show when I enter the URL and hit enter. The user has to accept and then go on to enter their credentials. 

 

Thanks 

HI June,

No it is actually UI Script it will go here.

find_real_file.png

 

and in the link i sent first code is for what you just need not the accepted one. Try and see if that works for you.

Because the accepted code is actully for the consent pop up after you login in case before login doesn't work.


***Mark Correct or Helpful if it helps.***