Code:
<form action="x" method="post" id="myform">
<textarea name="text"></textarea>
<label><input name="check" type="checkbox" onchange="handle_button_state();" /> Blah</label>
<input type="submit" disabled="disabled" name="sub" />
</form>
<script type="text/javascript">
function handle_button_state()
{
var el = document.getElementById('myform');
if (el)
{
if (el.check.checked)
{
el.sub.disabled = '';
}
else
{
el.sub.disabled = 'disabled';
}
}
}
</script>