<?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>topic Re: How to get Splunk Web to parse JavaScipt to implement a countdown timer? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237052#M14749</link>
    <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;
We are adding following script in simple XML dashboard.&lt;/P&gt;

&lt;H1&gt;jQuery Countdown Basics&lt;/H1&gt;</description>
    <pubDate>Fri, 07 Oct 2016 14:57:32 GMT</pubDate>
    <dc:creator>reach2tushar</dc:creator>
    <dc:date>2016-10-07T14:57:32Z</dc:date>
    <item>
      <title>How to get Splunk Web to parse JavaScipt to implement a countdown timer?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237050#M14747</link>
      <description>&lt;P&gt;Hi Splunk –&lt;/P&gt;

&lt;P&gt;We are trying to implement a countdown timer and seems script tags are not parsed by Splunk Web. The web simply ignores the Jquery/script tags. Can help with this or any alternate solution to get the countdown timer in on Splunk Web pages working?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237050#M14747</guid>
      <dc:creator>reach2tushar</dc:creator>
      <dc:date>2016-10-07T14:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Splunk Web to parse JavaScipt to implement a countdown timer?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237051#M14748</link>
      <description>&lt;P&gt;Can you clarify how you are trying to load the JS files? &lt;/P&gt;

&lt;P&gt;Are you trying to load them in a Simple XML dashboard or a custom HTML dashboard?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:39:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237051#M14748</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-10-07T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Splunk Web to parse JavaScipt to implement a countdown timer?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237052#M14749</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;
We are adding following script in simple XML dashboard.&lt;/P&gt;

&lt;H1&gt;jQuery Countdown Basics&lt;/H1&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237052#M14749</guid>
      <dc:creator>reach2tushar</dc:creator>
      <dc:date>2016-10-07T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Splunk Web to parse JavaScipt to implement a countdown timer?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237053#M14750</link>
      <description>&lt;P&gt;You have to add your script from a separate file:&lt;/P&gt;

&lt;P&gt;Add your script to an app: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/apps/&amp;lt;your_app&amp;gt;/appserver/static/&amp;lt;your_script&amp;gt;.js
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And restart Splunk (otherwise new files won't be seen):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk restart
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now go to your dashboard and add the script to the starting tag of the dashboard (could be &lt;CODE&gt;&amp;lt;dashboard&amp;gt;&lt;/CODE&gt; or &lt;CODE&gt;&amp;lt;form&amp;gt;&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="&amp;lt;your_app&amp;gt;:&amp;lt;your_script&amp;gt;.js"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And save your dashboard. Now make sure your script looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "jquery",
    "splunkjs/mvc/simplexml/ready!"
], function(
    $
) {

// Your script here

});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:59:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237053#M14750</guid>
      <dc:creator>gwobben</dc:creator>
      <dc:date>2016-10-07T14:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Splunk Web to parse JavaScipt to implement a countdown timer?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237054#M14751</link>
      <description>&lt;P&gt;Hi @reach2tushar&lt;/P&gt;

&lt;P&gt;When sharing any sample code, please be sure to highlight the entire block of code and click on the "Code Sample" button in the text editing tools to ensure special characters render properly. This is why your sample JavaScript isn't shown.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-get-Splunk-Web-to-parse-JavaScipt-to-implement-a/m-p/237054#M14751</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-10-07T17:57:30Z</dc:date>
    </item>
  </channel>
</rss>

