<?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: Can an HTML button with value be done without using JS and CSS scripts? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469535#M30830</link>
    <description>&lt;P&gt;@Deepz2612 @prettysunshinez If you want to avoid JS, you can try one of my following workaround which uses table cell values displayed as buttons so that we are allowed to set/unset token as part of table &lt;CODE&gt;&amp;lt;drilldown&amp;gt;&lt;/CODE&gt; using Simple XML itself.&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/7859iD3DED48A5756BF9D/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;Please try out and confirm. Let me know if you need explanation for any of the section of the run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Dashboard with Buttons using Formatted Table without JS based HTML buttons&amp;lt;/label&amp;gt;
  &amp;lt;row id="rowPanelTableButtons"&amp;gt;
    &amp;lt;panel id="panelTableButtonLeft"&amp;gt;
      &amp;lt;html depends="$alwaysHideCSSPanel$"&amp;gt;
        &amp;lt;style&amp;gt;
          #rowPanelTableButtons {
            display: inline-flex !important;
          }
          #panelTableButtonLeft .dashboard-panel{
            margin-right: 0px !important;
          }
          #tableWithHideButton table thead,
          #tableWithShowButton table thead{
            display: none !important;
          }
          #tableWithShowButton table tbody tr,
          #tableWithHideButton table tbody tr{
              display: flex;
          }
          #tableWithShowButton .element-footer,
          #tableWithHideButton .element-footer{
            visibility: hidden !important;
          }
          #tableWithShowButton table tbody tr td,
          #tableWithShowButton table tbody tr td:hover,
          #tableWithHideButton table tbody tr td,
          #tableWithHideButton table tbody tr td:hover{
            color: #fff;
            -webkit-box-shadow: inset 0 -2px 0 rgba(0,0,0,.1);
            box-shadow: inset 0 -2px 0 rgba(0,0,0,.1);
            text-decoration: none;
            text-shadow: none;
            -webkit-transition: background .2s,border .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            transition: background .2s,border .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            transition: background .2s,border .2s,box-shadow .2s,text-decoration .2s;
            transition: background .2s,border .2s,box-shadow .2s,text-decoration .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            -webkit-filter: none;
            filter: none;
          }
          #tableWithShowButton table tbody tr td,
          #tableWithHideButton table tbody tr td{
            padding: 6px 15px;
            font-weight: 500;
            background-color: #5cc05c;
            border: transparent;
            margin-right: 5px;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="tableWithShowButton"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval buttonShow="Show Panel"&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;set token="tokShowPanel"&amp;gt;true&amp;lt;/set&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel id="panelTableButtonRight"&amp;gt;
      &amp;lt;table id="tableWithHideButton"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval buttonHide="Hide Panel"&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
            &amp;lt;unset token="tokShowPanel"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&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;h3&amp;gt;Click Show to display HTML panel. Click Hide to hide the HTML panel.&amp;lt;/h3&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$tokShowPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;h2&amp;gt;HTML Panel&amp;lt;/h2&amp;gt;
        tokShowPanel: $tokShowPanel$
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Oct 2019 20:21:01 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-10-30T20:21:01Z</dc:date>
    <item>
      <title>Can an HTML button with value be done without using JS and CSS scripts?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469532#M30827</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I require an HTML button with the value.&lt;BR /&gt;
Can this be done without using JS and CSS scripts?&lt;/P&gt;

&lt;P&gt;Kindly help me.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 06:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469532#M30827</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2019-10-25T06:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can an HTML button with value be done without using JS and CSS scripts?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469533#M30828</link>
      <description>&lt;P&gt;@Deepz2612 &lt;/P&gt;

&lt;P&gt;Have you tried &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt; in &lt;CODE&gt;panel&lt;/CODE&gt; tag?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
   &amp;lt;html&amp;gt;
   &amp;lt;input type="button" value="my Button" /&amp;gt;
   &amp;lt;/html&amp;gt;
 &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can use any HTML tags over here. Please let us know if you have any issue with this.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 06:46:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469533#M30828</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-10-25T06:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can an HTML button with value be done without using JS and CSS scripts?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469534#M30829</link>
      <description>&lt;P&gt;Hi @Deepz2612 ,&lt;/P&gt;

&lt;P&gt;Try the below code.&lt;BR /&gt;
Accept &amp;amp; up-vote the answer if it helps.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row depends="$hidden$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal | head 1 |stats latest(_time) as Last_Occurance | convert ctime(Last_Occurance)&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;done&amp;gt;
            &amp;lt;set token="test"&amp;gt;$result.Last_Occurance$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&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;input type="button" value="$test$"/&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;&amp;gt;
  &amp;lt;row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;happy splunking.....!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 08:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469534#M30829</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-10-25T08:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can an HTML button with value be done without using JS and CSS scripts?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469535#M30830</link>
      <description>&lt;P&gt;@Deepz2612 @prettysunshinez If you want to avoid JS, you can try one of my following workaround which uses table cell values displayed as buttons so that we are allowed to set/unset token as part of table &lt;CODE&gt;&amp;lt;drilldown&amp;gt;&lt;/CODE&gt; using Simple XML itself.&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/7859iD3DED48A5756BF9D/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;Please try out and confirm. Let me know if you need explanation for any of the section of the run anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Dashboard with Buttons using Formatted Table without JS based HTML buttons&amp;lt;/label&amp;gt;
  &amp;lt;row id="rowPanelTableButtons"&amp;gt;
    &amp;lt;panel id="panelTableButtonLeft"&amp;gt;
      &amp;lt;html depends="$alwaysHideCSSPanel$"&amp;gt;
        &amp;lt;style&amp;gt;
          #rowPanelTableButtons {
            display: inline-flex !important;
          }
          #panelTableButtonLeft .dashboard-panel{
            margin-right: 0px !important;
          }
          #tableWithHideButton table thead,
          #tableWithShowButton table thead{
            display: none !important;
          }
          #tableWithShowButton table tbody tr,
          #tableWithHideButton table tbody tr{
              display: flex;
          }
          #tableWithShowButton .element-footer,
          #tableWithHideButton .element-footer{
            visibility: hidden !important;
          }
          #tableWithShowButton table tbody tr td,
          #tableWithShowButton table tbody tr td:hover,
          #tableWithHideButton table tbody tr td,
          #tableWithHideButton table tbody tr td:hover{
            color: #fff;
            -webkit-box-shadow: inset 0 -2px 0 rgba(0,0,0,.1);
            box-shadow: inset 0 -2px 0 rgba(0,0,0,.1);
            text-decoration: none;
            text-shadow: none;
            -webkit-transition: background .2s,border .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            transition: background .2s,border .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            transition: background .2s,border .2s,box-shadow .2s,text-decoration .2s;
            transition: background .2s,border .2s,box-shadow .2s,text-decoration .2s,-webkit-box-shadow .2s,-webkit-text-decoration .2s;
            -webkit-filter: none;
            filter: none;
          }
          #tableWithShowButton table tbody tr td,
          #tableWithHideButton table tbody tr td{
            padding: 6px 15px;
            font-weight: 500;
            background-color: #5cc05c;
            border: transparent;
            margin-right: 5px;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table id="tableWithShowButton"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval buttonShow="Show Panel"&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;set token="tokShowPanel"&amp;gt;true&amp;lt;/set&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel id="panelTableButtonRight"&amp;gt;
      &amp;lt;table id="tableWithHideButton"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| fields - _time
| eval buttonHide="Hide Panel"&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
            &amp;lt;unset token="tokShowPanel"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&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;h3&amp;gt;Click Show to display HTML panel. Click Hide to hide the HTML panel.&amp;lt;/h3&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$tokShowPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;h2&amp;gt;HTML Panel&amp;lt;/h2&amp;gt;
        tokShowPanel: $tokShowPanel$
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Oct 2019 20:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-an-HTML-button-with-value-be-done-without-using-JS-and-CSS/m-p/469535#M30830</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-10-30T20:21:01Z</dc:date>
    </item>
  </channel>
</rss>

