DOM manipulation alternative for Catalog Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2020 06:39 PM
After removing iFrame from catalog items and changing all the UI types to "All" on catalog client scripts, there are a bunch of DOM manipulation that is not supported anymore. Is there a similar method to getElementById of an button and change its style and is there a way to manipulate the innerHTML?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2020 06:45 PM
You can re-enable DOM manipulation if you'd prefer.
https://snprotips.com/blog/2017/7/21/how-to-enable-dom-manipulation-in-the-servicenow-service-portal
Please mark correct ✅ if this solves your issue and helpful 👍 if it has assisted you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2020 06:52 PM
Hi Lucy,
you can use gel instead of getElementById; also ensure Isolate script is set to false on the client scripts to allow DOM script to run
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 05:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 06:14 AM
Should work fine ideally
check if system property "glide.script.block.client.globals" is false if somebody created this property in your scope
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader