title: How to disable button after one click with validation using javascript?
body: <p>First I want to validate some of the field values entered or not. After that When i click the submit button, the button must be disabled after one click to avoid duplicate submission. How to do that using javascript? </p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
      function ValidateIt() {
        if (document.getElementById('ddlProblemCategory').value == 0) {
             alert("Please fill some value");
             return false;
        }
             return true;
      }
      function DisableIt() {
          if (ValidateIt() == true)
            document.getElementById('btnSaveProblem').disabled = true;
      }  
  &lt;/script&gt;
  </code></pre>
  
  <p></p>