title: enable/disable submit button based in input field (filled/not filled)
body: <p>what I am missing in this code, If I just want the input submit button to enable/disable/enable.. as long as I fill or unfill the input text? 
  sorry I am doing my best to learn javascript...can anyone help me fix this code?</p>
  
  <pre><code>&lt;form name="myform" method="post"&gt;
  &lt;input onkeyup="checkFormsValidity();" id="input_id" type="text" name="input_name" value=""/&gt;
  &lt;input type="submit" name="submit_name" value="OK" class="submit_class" id="SubmitButton"/&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
  var sbmtBtn = document.getElementById("SubmitButton");
  sbmtBtn.disabled = true; 
  
  function checkFormsValidity(){
  var myforms = document.forms["myform"];   
      if (myforms.checkValidity()) {
          sbmtBtn.disabled = false;
      } else {
          sbmtBtn.disabled = true;
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>This is the fiddle: <a href="https://jsfiddle.net/1zfm6uck/" rel="nofollow noreferrer">https://jsfiddle.net/1zfm6uck/</a></p>
  
  <p>Am I missing declaring onLoad mode or something like this? 
  Thanks!</p>