Dynamic iFrame Source for HTML Widgets Across Environments
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:35 AM
Hello Community,
I am currently working with HTML widgets in ServiceNow and have encountered an issue related to hardcoded iFrames in my HTML scripts. Currently, the iFrame is directly referencing our development environment, which poses a challenge when I attempt to deploy these portal pages to other environments (e.g., test, production).
Here are the specifics:
- What I've done: I have created HTML widgets that include an iFrame pointing to a specific URL within our dev instance.
- The issue: When moving these portal pages to other environments, the hardcoded URL breaks the functionality, as it still points to the dev instance.
- What I need: Is there a recommended approach or best practice for dynamically setting the iFrame source URL based on the environment? Ideally, I would like the iFrame to automatically point to the corresponding environment without hardcoding URLs.
Any guidance or suggestions on how to handle this ?
Thank you in advance for your help.
0 REPLIES 0