title: Enable/disable button using javascript
body: <p>I am trying to build a simple html app getting some basic customer information and storing the information in database.
  After capturing the information, when the customer logs in his profile, he can see 3 buttons.</p>
  
  <p><code>button 1= print</code></p>
  
  <p><code>button 2= delete</code> </p>
  
  <p><code>button 3= edit</code></p>
  
  <p><strong>Special requirement:</strong> </p>
  
  <ul>
  <li>Unless button 1 is clicked, </li>
  <li>Then button 2 and 3 should be disabled for the first time user logs in. </li>
  </ul>
  
  <p>For the next subsequent logins</p>
  
  <ul>
  <li>All buttons should be enabled.</li>
  </ul>
  
  <p>So far I have done the below thing:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script&gt;
          function enableButton() {
            document.getElementById("button2").disabled = false;
            document.getElementById("button3").disabled = false;
          } 
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="button" id="button1" value="print" onclick="enableButton()"  /&gt;
      &lt;input type="button" id="button2" value="delete" disabled /&gt;
      &lt;input type="button" id="button3" value="edit" disabled /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But this doesn't take care of the requirement described above. Any help would be appreciated</p>