<?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: Does anyone have a JavaScript sample to show/hide a drop-down upon selecting a value from another drop-down? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171886#M10574</link>
    <description>&lt;P&gt;You can set and unset tokens to show/hide dropdowns. Here is an example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;Set sourcetype token&amp;lt;/title&amp;gt;

  &amp;lt;input type="dropdown" token="field1"&amp;gt;
    &amp;lt;label&amp;gt;Select Sourcetype&amp;lt;/label&amp;gt;
    &amp;lt;choice value="1"&amp;gt;eml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="2"&amp;gt;http_access_log&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="3"&amp;gt;jvm&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="4"&amp;gt;layer7&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="5"&amp;gt;waspmi&amp;lt;/choice&amp;gt;
    &amp;lt;change&amp;gt;
      &amp;lt;!-- For the sourcetype field clicked: --&amp;gt;
      &amp;lt;!-- Set token to display a chart --&amp;gt;
      &amp;lt;!-- Unset token to display a table --&amp;gt;
      &amp;lt;condition value="1"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show1"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show2"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show3"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;!-- For any other field clicked: --&amp;gt;
      &amp;lt;!-- Set token to display a table --&amp;gt;
      &amp;lt;!-- Unset token to display a chart --&amp;gt;
      &amp;lt;condition value="2"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show2"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show1"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show3"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition value="3"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show3"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show2"&amp;gt;foo&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show1"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/change&amp;gt;
  &amp;lt;/input&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;input type="dropdown" token="field2" searchWhenChanged="true" depends="$show1$"&amp;gt;
    &amp;lt;label&amp;gt;Index&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;

  &amp;lt;input type="dropdown" token="field4" searchWhenChanged="true" depends="$show2$"&amp;gt;
    &amp;lt;label&amp;gt;JVM Name&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;

  &amp;lt;input type="dropdown" token="field4" searchWhenChanged="true" depends="$show3$"&amp;gt;
    &amp;lt;label&amp;gt;Host Name&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;


  &amp;lt;html rejects="$show1$, $show2$, $show3$"&amp;gt;
    &amp;lt;h2&amp;gt;Details&amp;lt;/h2&amp;gt;
      &amp;lt;div style="padding: 50px; margin: 0 auto; width: 350px;"&amp;gt;
      &amp;lt;div class="alert alert-warning"&amp;gt;
      &amp;lt;i class="icon-alert"/&amp;gt;
        Click on a row in the table on the left to show details.
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/html&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Mar 2016 17:20:51 GMT</pubDate>
    <dc:creator>kevshah</dc:creator>
    <dc:date>2016-03-30T17:20:51Z</dc:date>
    <item>
      <title>Does anyone have a JavaScript sample to show/hide a drop-down upon selecting a value from another drop-down?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171883#M10571</link>
      <description>&lt;P&gt;Anyone have Javascript to show/hide a drop-down while selecting a value from another drop-down?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 05:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171883#M10571</guid>
      <dc:creator>kkarthik2</dc:creator>
      <dc:date>2015-06-23T05:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a JavaScript sample to show/hide a drop-down upon selecting a value from another drop-down?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171884#M10572</link>
      <description>&lt;P&gt;Are you using simple xml dashboard?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2015 07:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171884#M10572</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-06-26T07:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a JavaScript sample to show/hide a drop-down upon selecting a value from another drop-down?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171885#M10573</link>
      <description>&lt;P&gt;yes we are using XML&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 09:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171885#M10573</guid>
      <dc:creator>kkarthik2</dc:creator>
      <dc:date>2015-07-14T09:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone have a JavaScript sample to show/hide a drop-down upon selecting a value from another drop-down?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171886#M10574</link>
      <description>&lt;P&gt;You can set and unset tokens to show/hide dropdowns. Here is an example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;Set sourcetype token&amp;lt;/title&amp;gt;

  &amp;lt;input type="dropdown" token="field1"&amp;gt;
    &amp;lt;label&amp;gt;Select Sourcetype&amp;lt;/label&amp;gt;
    &amp;lt;choice value="1"&amp;gt;eml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="2"&amp;gt;http_access_log&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="3"&amp;gt;jvm&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="4"&amp;gt;layer7&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="5"&amp;gt;waspmi&amp;lt;/choice&amp;gt;
    &amp;lt;change&amp;gt;
      &amp;lt;!-- For the sourcetype field clicked: --&amp;gt;
      &amp;lt;!-- Set token to display a chart --&amp;gt;
      &amp;lt;!-- Unset token to display a table --&amp;gt;
      &amp;lt;condition value="1"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show1"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show2"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show3"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;!-- For any other field clicked: --&amp;gt;
      &amp;lt;!-- Set token to display a table --&amp;gt;
      &amp;lt;!-- Unset token to display a chart --&amp;gt;
      &amp;lt;condition value="2"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show2"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show1"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show3"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition value="3"&amp;gt;
        &amp;lt;set token="sourcetype"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="show3"&amp;gt;foo&amp;lt;/set&amp;gt;
        &amp;lt;unset token="show2"&amp;gt;foo&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="show1"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/change&amp;gt;
  &amp;lt;/input&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
  &amp;lt;input type="dropdown" token="field2" searchWhenChanged="true" depends="$show1$"&amp;gt;
    &amp;lt;label&amp;gt;Index&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;

  &amp;lt;input type="dropdown" token="field4" searchWhenChanged="true" depends="$show2$"&amp;gt;
    &amp;lt;label&amp;gt;JVM Name&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;

  &amp;lt;input type="dropdown" token="field4" searchWhenChanged="true" depends="$show3$"&amp;gt;
    &amp;lt;label&amp;gt;Host Name&amp;lt;/label&amp;gt;
    &amp;lt;choice value="eml"&amp;gt;eeml&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="http"&amp;gt;http&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="layer7"&amp;gt;layer7&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;


  &amp;lt;html rejects="$show1$, $show2$, $show3$"&amp;gt;
    &amp;lt;h2&amp;gt;Details&amp;lt;/h2&amp;gt;
      &amp;lt;div style="padding: 50px; margin: 0 auto; width: 350px;"&amp;gt;
      &amp;lt;div class="alert alert-warning"&amp;gt;
      &amp;lt;i class="icon-alert"/&amp;gt;
        Click on a row in the table on the left to show details.
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/html&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Mar 2016 17:20:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Does-anyone-have-a-JavaScript-sample-to-show-hide-a-drop-down/m-p/171886#M10574</guid>
      <dc:creator>kevshah</dc:creator>
      <dc:date>2016-03-30T17:20:51Z</dc:date>
    </item>
  </channel>
</rss>

