I am currently discovering JavaScript and I have some problems... I want to to set a check box to checked by using Js, but it doesn't seem to work. :/
Here is the HTML code:
<td><input id="jm" type="checkbox" onClick="check(1)"></td>
<td><input id="conference" type="checkbox" name="casmaret"></td>
Here is the Js code:
function check(valeur)
switch (valeur)
{
case 1:
document.getElementById("jm").checked = true;
document.getElementById("conference").checked = true;
break;
}
}
I simplified it, but the fact is, I want to check some other checkbox by checking one checkbox. When I look over the debugger in Chrome, the function executes, but it doesn't change anything...
Any ideas?
Thanks