- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 03:41 AM
Hi,
I created a simple UI Script which is supposed to attach listener on window object. I marked this script as Active and Global.
But in some instances of ServiceNow this script is not injected into pages. By injection I mean that this script is not available at all.
I tried looking up browser source and came to know that all scripts are combined into one js_includes_customer*.js and then injected into page via which all UI Script are made available. So basically no script is included. I have already checked for javascript syntax / errors.
Any clue?
Solved! Go to Solution.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 09:50 AM
Hi Rahul,
Global UI scripts run within the gsft_main iframe. So if you are trying to access between frames you might have to accordingly adjust your logic to attach event listeners and publishers to other frames. Please add more detail as to what you are trying to accomplish here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 04:54 AM
Hi Rahul,
What do you mean by saying 'in some instances'.
Please if you share some more indications in order to let me check a possible reason of that behavior.
In particular, which are the pages where the javascript is not included.
Regards,
Loris D'Avanzo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 12:50 AM
I have multiple instances of ServiceNow, its not available on dashboard pages and randomly on list pages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 09:50 AM
Hi Rahul,
Global UI scripts run within the gsft_main iframe. So if you are trying to access between frames you might have to accordingly adjust your logic to attach event listeners and publishers to other frames. Please add more detail as to what you are trying to accomplish here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 12:52 AM
Because ServiceNow's plugin "OpenFrame" doesn't provide any API to interact directly with ServiceNow's other components like UI Scripts Etc. We are trying to develop a communication API between two using browsers PostMessage technique. But Randomly it fails as UI Script doesn't get included on some of the pages.