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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...