<?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 can I create a button switcher? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300586#M19114</link>
    <description>&lt;P&gt;@mrccasi in the above example there are two buttons that acts like a toggle. Would that not satisfy the reset button? If not you would need to state more details of your use case.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2019 16:34:32 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-06-26T16:34:32Z</dc:date>
    <item>
      <title>How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300566#M19094</link>
      <description>&lt;P&gt;hi &lt;BR /&gt;
i want to create a button switcher here is my code in xml format:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3641iC390E756F8CA0CB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;but it dosent work, can you help me to know what is my problem&lt;/P&gt;

&lt;P&gt;tanck you&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300566#M19094</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-07T10:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300567#M19095</link>
      <description>&lt;P&gt;I am pretty confident what you want to do is not possible using a button without writing JavaScript. To my knowledge, the HTML properties &lt;CODE&gt;data-set-token&lt;/CODE&gt; and &lt;CODE&gt;data-unset-token&lt;/CODE&gt; are not supported by Splunk.&lt;/P&gt;

&lt;P&gt;If you can use another input, you could use a checkbox or radio toggle to implement the token logic.&lt;/P&gt;

&lt;P&gt;If you must use buttons, then you will have to implement the clicking logic in a JavaScript extension to the dashboard. Examples to start with are here: &lt;A href="https://answers.splunk.com/answers/563964/i-have-4-buttons-with-different-tokens-if-i-click.html"&gt;https://answers.splunk.com/answers/563964/i-have-4-buttons-with-different-tokens-if-i-click.html&lt;/A&gt; or (my own) &lt;A href="https://blog.octoinsight.com/there-can-be-only-one-submit-button/"&gt;https://blog.octoinsight.com/there-can-be-only-one-submit-button/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300567#M19095</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-10-07T10:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300568#M19096</link>
      <description>&lt;P&gt;i try this from advanced splunk book chapter Button switcher . &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3636i244A86810C15D3B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 11:34:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300568#M19096</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-07T11:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300569#M19097</link>
      <description>&lt;P&gt;First, please use the "Add Comment" section to reply to an answer instead of adding an answer. It makes it harder to differentiate threads.&lt;/P&gt;

&lt;P&gt;To your question, I don't have the book so I can't speak to all the details, but I can pretty confidently say it won't work without JavaScript.  &lt;/P&gt;

&lt;P&gt;I did test it myself.  I recommend you download my Developer Gadgets App for Splunk (&lt;A href="https://splunkbase.splunk.com/app/3689/"&gt;https://splunkbase.splunk.com/app/3689/&lt;/A&gt;) and use the token debugger feature to inspect it. In my testing, the token &lt;CODE&gt;show_details&lt;/CODE&gt; never gets set using just the SimpleXML you posted.&lt;/P&gt;

&lt;P&gt;Here are the steps:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Install the Developer Gadgets App for Splunk&lt;/LI&gt;
&lt;LI&gt;Go to the App&lt;/LI&gt;
&lt;LI&gt;Click "Dashboards" from navigation menu&lt;/LI&gt;
&lt;LI&gt;Click "Create New Dashboard", fill out whatever details you want&lt;/LI&gt;
&lt;LI&gt;On the new dashboard, click "Edit Source" and copy the following SimpleXML into the source editor&lt;/LI&gt;
&lt;LI&gt;Once the page loads, click the "Gadgets" feature in the bottom right corner&lt;/LI&gt;
&lt;LI&gt;Click the "Enable Debug" checkbox, you should see a token debugger pop up on the bottom of the dashboard&lt;/LI&gt;
&lt;LI&gt;Click you &lt;CODE&gt;Show Details&lt;/CODE&gt; button and notice that the token does not appear in the token debugger&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Test SimpleXML&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form script="developer_gadgets:load.js"&amp;gt;
      &amp;lt;label&amp;gt;Demo Clone&amp;lt;/label&amp;gt;
      &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;
      &amp;lt;/fieldset&amp;gt;
      &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
          &amp;lt;title&amp;gt;Test&amp;lt;/title&amp;gt;
          &amp;lt;html&amp;gt;
            &amp;lt;button class="btn" data-set-token="show_details" data-value="true"&amp;gt;Show Details&amp;lt;/button&amp;gt;
          &amp;lt;/html&amp;gt;
        &amp;lt;/panel&amp;gt;
      &amp;lt;/row&amp;gt;
    &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Oct 2017 12:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300569#M19097</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-10-07T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300570#M19098</link>
      <description>&lt;P&gt;sorry,thanks for your reply.&lt;BR /&gt;
here is the link of this book in google website&lt;/P&gt;

&lt;P&gt;&lt;A href="https://books.google.com/books?id=dv9vDQAAQBAJ&amp;amp;pg=PA233&amp;amp;lpg=PA233&amp;amp;dq=buttons+switcher+on+splunk+dashboard&amp;amp;source=bl&amp;amp;ots=vPq8A_-6pi&amp;amp;sig=B25-yRre6fiRlXy_p7taG0jtfbA&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ved=0ahUKEwiEwPTBqN7WAhWL8CYKHRkGCTEQ6AEIdDAI"&gt;https://books.google.com/books?id=dv9vDQAAQBAJ&amp;amp;pg=PA233&amp;amp;lpg=PA233&amp;amp;dq=buttons+switcher+on+splunk+dashboard&amp;amp;source=bl&amp;amp;ots=vPq8A_-6pi&amp;amp;sig=B25-yRre6fiRlXy_p7taG0jtfbA&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ved=0ahUKEwiEwPTBqN7WAhWL8CYKHRkGCTEQ6AEIdDAI&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;i will do your suggest.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 04:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300570#M19098</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-08T04:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300571#M19099</link>
      <description>&lt;P&gt;is it possible to tell me where should i put the Javascript and CSS file for my dashboard?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 10:44:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300571#M19099</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-08T10:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300572#M19100</link>
      <description>&lt;P&gt;Usually, you put the JavaScript and CSS files loaded by a dashboard in the folder &lt;CODE&gt;appserver/static&lt;/CODE&gt; that is contained in the app folder for the app that the contains your dashboard.  For example, if your app's folder is &lt;CODE&gt;cool_dashboards&lt;/CODE&gt;, you would put the CSS and JavaScript loaded by the dashboard in the path: &lt;CODE&gt;cool_dashboards/appserver/static&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;More details are here: &lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAE4A"&gt;http://dev.splunk.com/view/webframework-developapps/SP-CAAAE4A&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;One thing the link is missing is what to do when you first install the JS/CSS files. The first time you load the files, you should restart Splunk in order for Splunk to find the files. After that, any time you change the JS/CSS files for the app, you need to tell Splunk to dump its cache using what's called a &lt;CODE&gt;bump&lt;/CODE&gt;. You bump Splunk by going to &lt;CODE&gt;&lt;A href="http://&amp;lt;YOUR_SPLUNK_SERVER_WEB_ADDRESS_AND" target="test_blank"&gt;http://&amp;lt;YOUR_SPLUNK_SERVER_WEB_ADDRESS_AND&lt;/A&gt; PORT&amp;gt;/en_US/_bump&lt;/CODE&gt; and clicking the button on that page. More info here: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomizationOptions"&gt;https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomizationOptions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 11:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300572#M19100</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-10-08T11:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300573#M19101</link>
      <description>&lt;P&gt;@khanlarloo, as stated by @rjthibod, the example that you are trying to implement is not a valid working example. You would need to use JavaScript to code &lt;CODE&gt;click()&lt;/CODE&gt; events of &lt;CODE&gt;Show&lt;/CODE&gt; and &lt;CODE&gt;Hide&lt;/CODE&gt; buttons to set and unset required token using jQuery and Splunk JS Stack.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3637i4A6B35CA3515FF8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Following is a run anywhere example with require Dashboard Simple XML and JavaScript code. PS: I have give Show and Hide HTML buttons ids &lt;CODE&gt;showButton&lt;/CODE&gt; and &lt;CODE&gt;hideButton&lt;/CODE&gt; respectively to easily access through jQuery selector based on ids. You can create specific classes if you want to apply something similar on several buttons. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="button_click.js"&amp;gt;
  &amp;lt;label&amp;gt;Button Switcher Example&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Example to Show or Hide Details Panel based on respective Button Clicks&amp;lt;/title&amp;gt;
      &amp;lt;html&amp;gt;
        show_details : $show_details$
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;button id="showButton" class="btn"&amp;gt;Show&amp;lt;/button&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO
| timechart count by log_level&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel depends="$show_details$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;button id="hideButton" class="btn"&amp;gt;Hide&amp;lt;/button&amp;gt;        
      &amp;lt;/html&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO
| timechart count by log_level&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;5&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And place the JavaScript &lt;CODE&gt;button_click.js&lt;/CODE&gt; under your Splunk App's static folder i.e. &lt;CODE&gt;$SPLUNK_HOME$/etc/apps/&amp;lt;YourAppName&amp;gt;/appserver/static&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "splunkjs/mvc",
    "splunkjs/mvc/simplexml/ready!"
], function(
            mvc
            ) {
        var defaultTokenModel = mvc.Components.get("default");
        var submittedTokenModel = mvc.Components.get("submitted");
        $("#showButton").click(function(){
            defaultTokenModel.set("show_details","true"); 
            submittedTokenModel.set("show_details","true"); 
        });
        $("#hideButton").click(function(){
            defaultTokenModel.unset("show_details");
            submittedTokenModel.unset("show_details"); 
        });
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Since this requires &lt;CODE&gt;static&lt;/CODE&gt; file i.e. &lt;CODE&gt;button_click.js&lt;/CODE&gt;, you might need to restart/refresh/bump Splunk and also clear internet browser cache for the changes to reflect.&lt;/P&gt;

&lt;P&gt;If you also want to hide the &lt;CODE&gt;Show&lt;/CODE&gt; button, when the Details panel is displayed and toggle back to show when Hide button in Details panel is clicked then you can add &lt;CODE&gt;rejects&lt;/CODE&gt; attribute for the &lt;CODE&gt;html&lt;/CODE&gt; panel containing &lt;CODE&gt;Show&lt;/CODE&gt; button i.e.,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;html rejects="$show_details$"&amp;gt;
    &amp;lt;button id="showButton" class="btn"&amp;gt;Show&amp;lt;/button&amp;gt;
  &amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Oct 2017 18:55:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300573#M19101</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-08T18:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300574#M19102</link>
      <description>&lt;P&gt;Thank You for your Reply&lt;/P&gt;

&lt;P&gt;I create my dashboard in this path  &lt;A href="http://Splunk"&gt;http://Splunk&lt;/A&gt; IP Address:Port/en-US/app/search/time_picker&lt;BR /&gt;
and put  .js file in this path /opt/splunk/etc/apps/search/appserver/static&lt;BR /&gt;
But it dosent show any thing.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 05:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300574#M19102</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-09T05:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300575#M19103</link>
      <description>&lt;P&gt;Paths seem correct.&lt;/P&gt;

&lt;P&gt;Have you restarted or refreshed Splunk for the JavaScript to be picked? You might also need to clear Internet browser history for changes to reflect.&lt;/P&gt;

&lt;P&gt;If still it does not work, you would need to put debug lines in your JavaScript like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;alert("YourDebugMsgForPopUp");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or to ensure that JavaScript is being loaded in Dashboard.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;console.log("YourDebugMsgForConsole");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please also ensure that your dashboard root node refers to the JavaScript file using :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;dashboard script="button_click.js"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Oct 2017 08:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300575#M19103</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-09T08:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300576#M19104</link>
      <description>&lt;P&gt;Thanks alot , i do and worked &lt;BR /&gt;
thanx for your help&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 06:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300576#M19104</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-10T06:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300577#M19105</link>
      <description>&lt;P&gt;@khanlarloo, please accept the answer and up vote comments that helped.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 06:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300577#M19105</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-10T06:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300578#M19106</link>
      <description>&lt;P&gt;is it possible to hide show panel when hidden panel is shown?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 07:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300578#M19106</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-10T07:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300579#M19107</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; @khanlarloo, I think you missed the final few lines of my answer. You can use &lt;CODE&gt;&amp;lt;rejects&amp;gt;&lt;/CODE&gt; attribute to create the Toggle between &lt;STRONG&gt;Hide&lt;/STRONG&gt; and &lt;STRONG&gt;Show&lt;/STRONG&gt; buttons. Please refer to the &lt;CODE&gt;PS:&lt;/CODE&gt; section towards the end of my answer. Let me know if further detail is required.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 09:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300579#M19107</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-10T09:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300580#M19108</link>
      <description>&lt;P&gt;i do this but it just hide the show button when click on it &lt;BR /&gt;
it shows (show button ) like this&lt;/P&gt;

&lt;P&gt;show_details : true&lt;BR /&gt;
but shows both of them, and dosent hide the show pannel&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 09:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300580#M19108</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-10T09:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300581#M19109</link>
      <description>&lt;P&gt;Sorry I missed the question. If you want to hide the &lt;CODE&gt;&amp;lt;panel&amp;gt;&lt;/CODE&gt; with Show button, &lt;CODE&gt;&amp;lt;rejects&amp;gt;&lt;/CODE&gt; should be added to panel and not button:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel rejects="$show_details$"&amp;gt;
       &amp;lt;html&amp;gt;
         &amp;lt;button id="showButton" class="btn"&amp;gt;Show&amp;lt;/button&amp;gt;
       &amp;lt;/html&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hopefully the concept is clear.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 09:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300581#M19109</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-10T09:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300582#M19110</link>
      <description>&lt;P&gt;thanks for helping me .I did it and it worked.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300582#M19110</guid>
      <dc:creator>khanlarloo</dc:creator>
      <dc:date>2017-10-10T10:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300583#M19111</link>
      <description>&lt;P&gt;@khanlarloo, Yay! Glad it worked. You can up vote if it helped.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 01:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300583#M19111</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-11T01:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300584#M19112</link>
      <description>&lt;P&gt;Many thanks for this great example !&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300584#M19112</guid>
      <dc:creator>cardinalga</dc:creator>
      <dc:date>2018-01-04T13:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create a button switcher?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300585#M19113</link>
      <description>&lt;P&gt;Hi @niketnilay , do happen to know a js code that reset filters to its default value when hitting the Reset button? Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 06:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-create-a-button-switcher/m-p/300585#M19113</guid>
      <dc:creator>mrccasi</dc:creator>
      <dc:date>2019-06-26T06:43:07Z</dc:date>
    </item>
  </channel>
</rss>

