<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question UI Builder (UIB) - Client Script.  How to access window ($window). in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/ui-builder-uib-client-script-how-to-access-window-window/m-p/2941689#M169</link>
    <description>&lt;P&gt;In my UIB landing page, I have a bar graph and a list view under it.&amp;nbsp; The graph is responsive in that it changes the list view upon clicking one of the bars in the graphic.&amp;nbsp; I have been asked to add a scrolling mechanism that takes the user to the list upon clicking that bar element.&amp;nbsp; But, I don't know how to manipulate 'document' or 'window' objects within UIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do a scroll to when the bar graph elements are clicked, the user is automatically scrolled to the list view.&amp;nbsp; i need to do this in a client script but $window/window is not available there to do a scrollTo().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nor is "document" and I therefore cannot do this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;getElementById&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"divFirst"&lt;/SPAN&gt;).&lt;SPAN class=""&gt;scrollIntoView&lt;/SPAN&gt;();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;location.&lt;SPAN class=""&gt;href&lt;/SPAN&gt; = &lt;SPAN class=""&gt;"#myDiv"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;Any ideas how I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2024 15:34:41 GMT</pubDate>
    <dc:creator>paige6</dc:creator>
    <dc:date>2024-05-29T15:34:41Z</dc:date>
    <item>
      <title>UI Builder (UIB) - Client Script.  How to access window ($window).</title>
      <link>https://www.servicenow.com/community/community-central-forum/ui-builder-uib-client-script-how-to-access-window-window/m-p/2941689#M169</link>
      <description>&lt;P&gt;In my UIB landing page, I have a bar graph and a list view under it.&amp;nbsp; The graph is responsive in that it changes the list view upon clicking one of the bars in the graphic.&amp;nbsp; I have been asked to add a scrolling mechanism that takes the user to the list upon clicking that bar element.&amp;nbsp; But, I don't know how to manipulate 'document' or 'window' objects within UIB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do a scroll to when the bar graph elements are clicked, the user is automatically scrolled to the list view.&amp;nbsp; i need to do this in a client script but $window/window is not available there to do a scrollTo().&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nor is "document" and I therefore cannot do this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;document&lt;/SPAN&gt;.&lt;SPAN class=""&gt;getElementById&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"divFirst"&lt;/SPAN&gt;).&lt;SPAN class=""&gt;scrollIntoView&lt;/SPAN&gt;();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;location.&lt;SPAN class=""&gt;href&lt;/SPAN&gt; = &lt;SPAN class=""&gt;"#myDiv"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;Any ideas how I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 15:34:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/ui-builder-uib-client-script-how-to-access-window-window/m-p/2941689#M169</guid>
      <dc:creator>paige6</dc:creator>
      <dc:date>2024-05-29T15:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: UI Builder (UIB) - Client Script.  How to access window ($window).</title>
      <link>https://www.servicenow.com/community/community-central-forum/ui-builder-uib-client-script-how-to-access-window-window/m-p/2947188#M194</link>
      <description>&lt;P data-unlink="true"&gt;The UX Client Script "Article actions" uses the UX client script include "Article actions include"&amp;nbsp; which executes location.origin.&amp;nbsp; When I duplicate this configuration I get an error message that 'origin' is undefined.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 18:46:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/ui-builder-uib-client-script-how-to-access-window-window/m-p/2947188#M194</guid>
      <dc:creator>paige6</dc:creator>
      <dc:date>2024-05-29T18:46:33Z</dc:date>
    </item>
  </channel>
</rss>

