Advertisement
NiTeWuRX

Require Checkbox for Submit Button

Jun 6th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Require Checkbox for Submit Button
  2.  
  3. ## put this in head area
  4. <script type="text/javascript">
  5. <!--
  6. window.onload=function() {
  7.   df=document.forms[0];
  8.   df[1].disabled=true;
  9.   df[0].onclick=function(){
  10.   df[1].disabled=(df[1].disabled)?false:true;
  11.   }
  12.  }
  13. //-->
  14. </script>
  15.  
  16. ## put this in body area
  17. <form action="#">
  18. <div>
  19. <input type="checkbox"/>
  20. <input type="submit" value="Submit Application" class="button"/>
  21. </div>
  22. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement