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"

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

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

Contributor

The element is correct not need modification for that.

0 Karma

Contributor

nobody can help?

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

0 Karma

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
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!