Hey, I'm quite new to javascript, and I have come to a bit of a sticking point which is (probably) easy to fix. Im trying to make the submit button active when th checkbox is checked, and greyed out when not checked.

The code:
Code:
<p><input type="checkbox" id="termsChkbx" /></p>	      

	    <p><input type="submit" name="submit" value="Order now!" id="sub1" disabled="disabled"/></p>
i know this gives me a greyed out submit button, but when i change it to:

Code:
<input type="checkbox" id="termsChkbx" onclick="hasReadTerms( this.id, 'sub1') /></p>    
	    
	    <p><input type="submit" name="submit" value="Order now!" id="sub1" disabled="disabled"/></p>
  
		<script type="text/javascript">
		
		function hasReadTerms( checkBoxID, buttonID ) {
			// only enable the submit button if the accept terms box is checked
			var termsChkbx = document.getElementById( checkBoxID );
			var submitBtn = document.getElementById( buttonID );
   			if ( chkbx.checked ) {
				submitBtn.disabled = false;
			}
			else {
				submitBtn.disabled = true;
			}
</script>
The submit button disappears and nothing changes when I check the box. Any help would be appreciated! Thanks!