window.open written in a client script and its not working on Service Portal

prabh
Mega Expert

Hi Folks,

I have a catalog item and in that there is onchange client script which opens different URLs based on the value selected using window.open() function.

But this script is not working on Service Portal. I have changed the UI type of the script to "Both" as well.

Please help.

Thanks

Preety Arora

23 REPLIES 23

prithvirajchaud
Mega Expert

Hi,



Can you confirm, if you are using a scoped application or not. Because if you are the window object would give you null.


Scoped Applications and Client Scripts: A Primer . If this is your case then the solution is that you need to ship a True/False system property in your application named glide.script.block.client.globals with the value false.



Thanks


Please like , mark as helpful or correct if you think so.


Hi Prithviaj,



I do not have much idea of applications. But the Client SCript which is not working has Global as application.



Could you please guide me here what do I exactly need to check please



Thanks


HI,



Yes my window object is returning null.