<?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 Javascript not working in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Javascript-not-working/m-p/486651#M31891</link>
    <description>&lt;P&gt;I'm trying to enable submit button only when there are 7 digits entered in the textbox.&lt;BR /&gt;
below is the javascript I'm trying it with&lt;/P&gt;

&lt;P&gt;require([&lt;BR /&gt;
    "jquery",&lt;BR /&gt;
    "splunkjs/mvc/simplexml/ready!"&lt;BR /&gt;
], function($,TableView, mvc, DashboardController){&lt;BR /&gt;
  var checkAndSetEvents = function() {&lt;BR /&gt;
    if($("#user_input").length) {&lt;BR /&gt;
      $("#user_input").change(function(event){&lt;BR /&gt;
        if(event.target.value &amp;amp;&amp;amp; event.target.value.length &amp;gt; 7) {&lt;BR /&gt;
          $(".btn.btn-primary.submit").removeAttr("disabled");&lt;BR /&gt;
        } else {&lt;BR /&gt;
          $(".btn.btn-primary.submit").attr("disabled", "disabled");&lt;BR /&gt;
        }&lt;BR /&gt;
      });&lt;BR /&gt;
    } else {&lt;BR /&gt;
      setTimeout(checkAndSetEvents, 500);&lt;BR /&gt;
    }&lt;BR /&gt;
  }&lt;BR /&gt;
  checkAndSetEvents();&lt;/P&gt;

&lt;P&gt;});&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:00:49 GMT</pubDate>
    <dc:creator>GrishmaG</dc:creator>
    <dc:date>2020-09-30T03:00:49Z</dc:date>
    <item>
      <title>Javascript not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Javascript-not-working/m-p/486651#M31891</link>
      <description>&lt;P&gt;I'm trying to enable submit button only when there are 7 digits entered in the textbox.&lt;BR /&gt;
below is the javascript I'm trying it with&lt;/P&gt;

&lt;P&gt;require([&lt;BR /&gt;
    "jquery",&lt;BR /&gt;
    "splunkjs/mvc/simplexml/ready!"&lt;BR /&gt;
], function($,TableView, mvc, DashboardController){&lt;BR /&gt;
  var checkAndSetEvents = function() {&lt;BR /&gt;
    if($("#user_input").length) {&lt;BR /&gt;
      $("#user_input").change(function(event){&lt;BR /&gt;
        if(event.target.value &amp;amp;&amp;amp; event.target.value.length &amp;gt; 7) {&lt;BR /&gt;
          $(".btn.btn-primary.submit").removeAttr("disabled");&lt;BR /&gt;
        } else {&lt;BR /&gt;
          $(".btn.btn-primary.submit").attr("disabled", "disabled");&lt;BR /&gt;
        }&lt;BR /&gt;
      });&lt;BR /&gt;
    } else {&lt;BR /&gt;
      setTimeout(checkAndSetEvents, 500);&lt;BR /&gt;
    }&lt;BR /&gt;
  }&lt;BR /&gt;
  checkAndSetEvents();&lt;/P&gt;

&lt;P&gt;});&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:00:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Javascript-not-working/m-p/486651#M31891</guid>
      <dc:creator>GrishmaG</dc:creator>
      <dc:date>2020-09-30T03:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Javascript-not-working/m-p/486652#M31892</link>
      <description>&lt;P&gt;This is the dashboard&lt;/P&gt;

&lt;P&gt;"""&lt;/P&gt;

&lt;P&gt;User Dashboard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input id="user_input" type="text" token="user"&amp;gt;
  &amp;lt;label&amp;gt;Enter User Bank ID&amp;lt;/label&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"""&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 08:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Javascript-not-working/m-p/486652#M31892</guid>
      <dc:creator>GrishmaG</dc:creator>
      <dc:date>2019-11-19T08:32:16Z</dc:date>
    </item>
  </channel>
</rss>

