bogu wrote:Look here I made u and example of what u need:
<form>
<input type="checkbox" name="chk" value="1" onclick="return _DoSomething(this);" />
<input type="submit" name="btn" value="Bimbo :)" disabled />
</form>
<script>
var _dd = document.forms[0];
function _DoSomething(the_chk) {
if (the_chk.checked) {
_dd.btn.disabled = false;
} else {
_dd.btn.disabled = true;
}
}
</script>
Have fun coding. 😃
I am so grateful you showed us an example - wasn't sure where to look. For some reason when I tick the box to accespt the terms my button doesn't display.
I have done the same as your example.
<p><input type="checkbox" name="chk" value="1" onclick="return _DoSomething(this);" />Check to accept agreement. <a href="terms.php" target="_blank">View end user licence agreement</a></p>
<p> <input type="submit" name="btn" value="Sign Up!" disabled /></p></form>
I used the script in the header.
Any ideas why it's not working?