UI Builder (UIB) - Client Script. How to access window ($window).

paige6
Tera Contributor

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?

 

 

1 REPLY 1

paige6
Tera Contributor

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.