Dashboards & Visualizations

How do I fix the header of a table search with javascript in my HTML dashboard? Getting error "Cannot read property 'top' of undefined"

sfatnass
Contributor

hi

I'm trying to fix the header of a table search in my dashboard.
My code is based on javascript. It works on http://jsfiddle.net/3q8py094/

However, when I try to add it on my dashboard, I get this message:

Uncaught TypeError: Cannot read property 'top' of undefined

I think this is because my table is not created, but how can I resolve it?

ps: I use an HTML dashboard

0 Karma

shaskell_splunk
Splunk Employee
Splunk Employee

It looks to me like the following code isn't getting the correct element in your dashboard which is leading to an undefined error.

var querySelector = 'table[id*=drilldown]';

You'll probably want to use developer tools in your browser to explore the HTML and see what your table element is named. I'm not sure I can get any more specific without seeing your code.

0 Karma

sfatnass
Contributor

The element is correct not need modification for that.

0 Karma

sfatnass
Contributor

nobody can help?

i'm open to try any other solution to fix the header on table

0 Karma

shaskell_splunk
Splunk Employee
Splunk Employee

It would be helpful if you could share the code for your dashboard somehow and some sample data otherwise we're just guessing. Also specify what version of Splunk you are running on.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...