hi , afraid my javascript is quite basic (when i was at uni many years ago it appears i didn't pay enough attention )
i'm trying to do something very simple but getting no where fast ...
basically if a check box is ticked i want it to change the value to 0.5 and if it is unticked to run a function ... so far my code looks like this
<script language="javascript">
function checkBox() {
if (document.form.halfDay.checked) {
(document.form.lenghtOfAbsence.value)=="0.5";
}
}
</script>
which is initiated by the following in the form
<input type =checkbox name = halfDay onChange="checkBox()">
can anyone help me please
i'm trying to do something very simple but getting no where fast ...
basically if a check box is ticked i want it to change the value to 0.5 and if it is unticked to run a function ... so far my code looks like this
<script language="javascript">
function checkBox() {
if (document.form.halfDay.checked) {
(document.form.lenghtOfAbsence.value)=="0.5";
}
}
</script>
which is initiated by the following in the form
<input type =checkbox name = halfDay onChange="checkBox()">
can anyone help me please