<?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: button click functionality: how do I change the name of a button? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444170#M29259</link>
    <description>&lt;P&gt;@Mohsin123, if you just want to change the label of &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; button input,&lt;BR /&gt;
The following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&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;Should be changed to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;html&amp;gt;
     &amp;lt;button id="showButton" class="btn"&amp;gt;Click to view percentage&amp;lt;/button&amp;gt;
   &amp;lt;/html&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Sep 2018 19:31:18 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-09-07T19:31:18Z</dc:date>
    <item>
      <title>button click functionality: how do I change the name of a button?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444167#M29256</link>
      <description>&lt;P&gt;hi ,&lt;/P&gt;

&lt;P&gt;i have added a show-hide button using buttonclick.js functionality...&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;...but the show button is displayed as Show&lt;/P&gt;

&lt;P&gt;i want to change the name of the show button. &lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 19:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444167#M29256</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-05T19:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: button click functionality: how do I change the name of a button?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444168#M29257</link>
      <description>&lt;P&gt;@Mohsin123, I hope this is with reference to one of my older answers to &lt;A href="https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html"&gt;Create Button Switcher&lt;/A&gt;. If you read the thread carefully the example actually had two buttons Show and Hide and the toggle between showing hide or show button was created the Panel with &lt;CODE&gt;depends&lt;/CODE&gt; and &lt;CODE&gt;rejects&lt;/CODE&gt; attributes.&lt;/P&gt;

&lt;P&gt;So the example was not changing the name of same button rather there were two buttons. Please describe your use case, in case you do not want two buttons and why.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 08:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444168#M29257</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-09-06T08:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: button click functionality: how do I change the name of a button?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444169#M29258</link>
      <description>&lt;P&gt;@niketnilay &lt;BR /&gt;
i have used your code .&lt;BR /&gt;
My question is the button name is show , right?&lt;BR /&gt;
i want to change the button name from show to: "click to view percentage"&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444169#M29258</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-07T15:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: button click functionality: how do I change the name of a button?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444170#M29259</link>
      <description>&lt;P&gt;@Mohsin123, if you just want to change the label of &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; button input,&lt;BR /&gt;
The following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&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;Should be changed to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;html&amp;gt;
     &amp;lt;button id="showButton" class="btn"&amp;gt;Click to view percentage&amp;lt;/button&amp;gt;
   &amp;lt;/html&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Sep 2018 19:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/button-click-functionality-how-do-I-change-the-name-of-a-button/m-p/444170#M29259</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-09-07T19:31:18Z</dc:date>
    </item>
  </channel>
</rss>

