I need an onload popup when user opens Catalog Item

Dawid2
Giga Guru

Hello,

 

When user clicks on the catalog item on the Portal, I need a popup when it's opened that will contain some text, URL to another catalog item and Okay button that will redirect to main Portal page. What would be the best way to achieve this?

5 REPLIES 5

priyasunku
Kilo Sage

@Dawid2  you can create content item and give URL to another catalog item. so when user clicks on catalog item it redirects to another catalog item.

 

priyasunku_0-1678698999182.png

 

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

Dawid2
Giga Guru

I'd rather have popup message, that's the customer's requirement.

Prince Arora
Tera Sage
Tera Sage

@Dawid2 ,

 

Please create a onLoad client script and write the below mentioned script in it:

var str = '<div>This is my text <br></br> <button onclick=' + '"window.open("https://www.google.com/")"'+
'>Submit</button></div>'
var gm = new GlideModal()
gm.setTitle('This is my title');
gm.setWidth(550);
gm.renderWithContent(str);

 

Please let me know if you have any doubts in it.

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Prince Arora
Tera Sage
Tera Sage

@Dawid2 ,

 

Have it worked for you?

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.