UI Builder (UIB) - Client Script. How to access window ($window).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 11:19 AM - edited 05-29-2024 08:34 AM
In my UIB landing page, I have a bar graph and a list view under it. The graph is responsive in that it changes the list view upon clicking one of the bars in the graphic. I have been asked to add a scrolling mechanism that takes the user to the list upon clicking that bar element. But, I don't know how to manipulate 'document' or 'window' objects within UIB.
I need to do a scroll to when the bar graph elements are clicked, the user is automatically scrolled to the list view. i need to do this in a client script but $window/window is not available there to do a scrollTo().
Nor is "document" and I therefore cannot do this:
document.getElementById("divFirst").scrollIntoView();
or
location.href = "#myDiv";
Any ideas how I do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 11:46 AM
The UX Client Script "Article actions" uses the UX client script include "Article actions include" which executes location.origin. When I duplicate this configuration I get an error message that 'origin' is undefined.