<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to enable / disable table element drilldown through java script in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145542#M40573</link>
    <description>&lt;P&gt;hi rakesh did you solved your problem?&lt;/P&gt;</description>
    <pubDate>Fri, 25 Sep 2015 14:35:28 GMT</pubDate>
    <dc:creator>sfatnass</dc:creator>
    <dc:date>2015-09-25T14:35:28Z</dc:date>
    <item>
      <title>How to enable / disable table element drilldown through java script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145540#M40571</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I was having a requirement to enable / disable table element drilldown. i mean if my SH is a Job server i would enable the drilldown option for table elment and should disable the option if its a Search head.&lt;/P&gt;

&lt;P&gt;I have used the following code snippnet . but this not working . Can you please help me ? where am i going wrong ??&lt;/P&gt;

&lt;P&gt;// Sample code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     var element1 = new TableElement({
             "id": "element1",          
         `"link.exportResults.visible":  "true",
            "link.inspectSearch.visible": "false",
             "link.openSearch.visible": "false",            
               "drilldown": "row",
            "rowNumbers": "true",
            "managerid": "search1",
             "el": $('#element1')
         }, {tokens: true}).render();


            if(host ="JobServer")       {
             element1.settings.set("drilldown","row");
            }
            if(host ="SearchHead")      {
             element1.settings.set("drilldown","none");
            }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help me !! Thanks in Advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 12:14:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145540#M40571</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2015-02-17T12:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable / disable table element drilldown through java script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145541#M40572</link>
      <description>&lt;P&gt;Can you please share your xml :).. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2015 12:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145541#M40572</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-02-26T12:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable / disable table element drilldown through java script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145542#M40573</link>
      <description>&lt;P&gt;hi rakesh did you solved your problem?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2015 14:35:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145542#M40573</guid>
      <dc:creator>sfatnass</dc:creator>
      <dc:date>2015-09-25T14:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to enable / disable table element drilldown through java script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145543#M40574</link>
      <description>&lt;P&gt;The problem is in the host = 'JobServer' . In javascript '=' is the assignment operator. To compare You should use identity operator:  '==='.&lt;BR /&gt;
Please check &lt;A href="http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm"&gt;http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm&lt;/A&gt; for reference.&lt;/P&gt;

&lt;P&gt;So your code should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; if (host === "JobServer") {
    element1.settings.set("drilldown", "row");
 }
 if (host === "SearchHead") {
    element1.settings.set("drilldown", "none");
 }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-enable-disable-table-element-drilldown-through-java/m-p/145543#M40574</guid>
      <dc:creator>piUek</dc:creator>
      <dc:date>2015-09-30T08:07:03Z</dc:date>
    </item>
  </channel>
</rss>

