<?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 execute javascript after a search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/485684#M135894</link>
    <description>&lt;P&gt;You can try to use an event listener when a specific search is done.&lt;/P&gt;

&lt;P&gt;SearchID.on("search:done", function () {&lt;BR /&gt;
   // function here&lt;BR /&gt;
}&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2019 09:02:32 GMT</pubDate>
    <dc:creator>espirde</dc:creator>
    <dc:date>2019-10-08T09:02:32Z</dc:date>
    <item>
      <title>How to execute javascript after a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/485683#M135893</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I've copied the Search &amp;amp; Reporting app folder as my own app in /etc/apps, now I want to add some JS to be executed after a search has finished. Everything I've tried hasn't worked, anyone ever figure out a way to do this?&lt;/P&gt;
&lt;P&gt;I've tried changing isdashboard to True in search.xml, then specifying a JS file in script="myjs.js", it doesn't get executed, then I tried this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="AppBar" layoutPanel="appHeader"&amp;gt;
    &amp;lt;param name="timsharkjs"&amp;gt;timshark/timshark.js&amp;lt;/param&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;within search.xml, as I had seen another app (sideview_utils) doing something like this , didn't work.&lt;/P&gt;
&lt;P&gt;Any help would be greatly appreciated, thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 13:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/485683#M135893</guid>
      <dc:creator>big_nuggets</dc:creator>
      <dc:date>2023-07-06T13:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute javascript after a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/485684#M135894</link>
      <description>&lt;P&gt;You can try to use an event listener when a specific search is done.&lt;/P&gt;

&lt;P&gt;SearchID.on("search:done", function () {&lt;BR /&gt;
   // function here&lt;BR /&gt;
}&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 09:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/485684#M135894</guid>
      <dc:creator>espirde</dc:creator>
      <dc:date>2019-10-08T09:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute javascript after a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/649340#M224523</link>
      <description>&lt;P&gt;This doesn't work. It produces an error when the javascript is loaded.&lt;/P&gt;&lt;P&gt;I've tried:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    $("#NameSearchID").on( "search:done", function() {&lt;/LI-CODE&gt;&lt;P&gt;Referring to this in the simple XML:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search id="NameSearchID"&amp;gt;
...&lt;/LI-CODE&gt;&lt;P&gt;Do you have a full working example?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 15:24:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-execute-javascript-after-a-search/m-p/649340#M224523</guid>
      <dc:creator>gabriel_vasseur</dc:creator>
      <dc:date>2023-07-05T15:24:33Z</dc:date>
    </item>
  </channel>
</rss>

