Can't set a checkbox checked | JavaScript
<p>I am curently discovering javascript and I have somes problems...
I to to set a checkbox checked by using Js. But it doesn't seems to work :/</p>

<p>Here is the HTML code:</p>

<pre><code>&lt;td&gt;&lt;input id="jm" type="checkbox" onClick="check(1)"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input id="conference" type="checkbox" name="casmaret"&gt;&lt;/td&gt;
</code></pre>

<p>Here is the Js code:</p>

<pre><code> function check(valeur)

     switch (valeur)
     {
         case 1:
                  document.getElementById("jm").checked = true;
                  document.getElementById("conference").checked = true;
                  break;
      }
 }
</code></pre>

<p>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 doesn't change anything...</p>

<p>Any ideas ?</p>

<p>Thanks</p>
