window.open written in a client script and its not working on Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 04:36 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 05:19 AM
Please try
window.top.location or
window.parent.location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 05:32 AM
Hi Abdul,
Its not working.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 05:53 AM
Hi Abdul,
My mistake... this is working but I want to open the link in new tab not in same window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 06:46 AM
can you please give me screen shot of code you are trying to fix. (Full page screen)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2016 06:50 AM
Hi Preety,
According to the github documentation, many client side objects including window are not available within Service Portal:
Unsupported client scripting globals
The following globals and APIs are unavailable in service portal client script:
- window
- document
- $
- jQuery
- $$
- $j
- angular
documentation/client_scripting.md at master · service-portal/documentation · GitHub