title: checking checkboxes with name and within a div
body: <p>I am trying to write some javascript which will check the checkboxes within a div where the checkbox name matches the given name. Here is what I have, but it isn't doing anything:</p>
  
  <pre><code>function checkbox_control(container_id,element_name,status) {
      var children = document.getElementById(container_id).childNodes;
      alert(element_name);
      for(var b=0; b &lt; children.length; b++) {
          if(children[b].name == element_name){
              children[b].checked = status;
          }
      }
  }
  </code></pre>