Getting Data In

Accessing search results from html file of custom module

keerthana_k
Communicator

My requirement is to create a custom module which will run a search query and pass on the results to a .swf file which will be embedded inside the module's HTML. I am currently returning the result in JSON format from my python script.

Is there any way to pass this JSON object directly to the HTML file from the JS file's renderResults() function?

Or is there any way to pass the data as XML from the HTML file?

Or any alternate way to do this?

Tags (3)
0 Karma
1 Solution

strive
Influencer

Hi Keerthana, try including your JS (yourapp.js in your module html file. Declare a global variable and try accessing it with in your html.

Thanks
Strive

View solution in original post

strive
Influencer

Hi Keerthana, try including your JS (yourapp.js in your module html file. Declare a global variable and try accessing it with in your html.

Thanks
Strive

keerthana_k
Communicator

Thanks Strive.. It worked.!!!

0 Karma

strive
Influencer

Even i am facing similar problem. I do not want to format the JSON results in renderResults function. I just need to pass that as is to module view's HTML and access it there. I am unable to do it.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...