hey guys, so i want to disable the input button function unless checbox is checked. i found this forum and it sorta worked. the button is disabled when no checkbox is checked but it stays disabled even after checkbox is checked.
this is the html:
<input type="button" id="del_event" name="del_event" value="Delete Event" disabled="disabled"/>
<input type='checkbox' name='check' id='check' onclick='checkSubmit(this, 'del_event')' value='y'/>
this is the js:
<script type="text/javascript">
function checkSubmit(ele, id) {
x = document.getElementById(id);
if (ele.checked == true) x.disabled = false;
else x.disabled = true;
}
</script>