Splunk Search

How to execute javascript after a search



I've copied the Search & 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?

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:

<module name="AppBar" layoutPanel="appHeader">
    <param name="timsharkjs">timshark/timshark.js</param>

within search.xml, as I had seen another app (sideview_utils) doing something like this , didn't work.

Any help would be greatly appreciated, thank you.

0 Karma

Re: How to execute javascript after a search

New Member

You can try to use an event listener when a specific search is done.

SearchID.on("search:done", function () {
// function here

0 Karma