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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...