title: How to enable all checkbox when one checkbox is deselected ? using javascript
body: <p>My Code works when I select one checkbox , all gets disabled. Now i want that if i uncheck this selected checkbox, all checkbox should get enabled.
  Here is what i have tried</p>
  
  <pre><code>&lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '80' onclick='return(validate())'&gt;Q- 80. Statute of Liberty is in ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '153' onclick='return(validate())'&gt;Q- 153. Indias Republic day is celebrated on ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '65' onclick='return(validate())'&gt;Q- 65. Popular Language is ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '150' onclick='return(validate())'&gt;Q- 150. Girnar is located at ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '154' onclick='return(validate())'&gt;Q- 154. Largest Waterfall ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '152' onclick='return(validate())'&gt;Q- 152. Asia is an ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '139' onclick='return(validate())'&gt;Q- 139. Diamond is made up of ? &lt;/td&gt; &lt;/tr&gt;
  &lt;tr&gt; &lt;td colspan='3'&gt; &lt;input type='checkbox' name='check1' value = '123' onclick='return(validate())'&gt;Q- 123. Largest Desert ? &lt;/td&gt; &lt;/tr&gt;
  </code></pre>
  
  <p>JS: This javascript is when one selects the a checkbox , all gets disabled. I want vice versa, that when one deselects the checkbox all should get enabled</p>
  
  <pre><code>function validate(){
  
              for (i=0; i&lt;document.myForm.check1.length; i++){
                  if (document.myForm.check1[i].checked !=true){
                      document.myForm.check1[i].disabled='true';
                  }
              }
   }
  </code></pre>