Check boxes in specific state
<p>I have a grid of checkboxes of major cities in the US.  I have created a drop menu to select a state.  When the user clicks the submit button I want to selected all the checkboxes for that specific state.  I am already using a dynamic id for each check, I was thinking I could identify them with the title attribute.</p>

<p>Is there a way to select all "New York State" with regular javascript not jquery.</p>

<p>Any help would be greatly appreciated.</p>

<p>neojakey</p>

<p>EDIT</p>

<p>I was thinking along these lines</p>

<pre><code>function SelectState(StateAbbr)
{
     var f = document.frmChangeMemberPaid;
     checkboxes = document.getElementsByName('LocalPageID');
     for(var i in checkboxes)
     {
          if(checkboxes[i].attributes[1].name == StateAbbr)
          {
               checkboxes[i].checked = source.checked;
          }
     }
}
</code></pre>
