javascript iterating through pairs of logically connected elements
<p>I have a website with a series of empty text fields that the user can edit. Next to each text field is a check box as follows:</p>

<pre><code>&lt;input type="text" id="textfield1" size="60" /&gt;&lt;input type="checkbox"&gt; &lt;br /&gt;
&lt;input type="text" id="textfield2" size="60" /&gt;&lt;input type="checkbox"&gt; &lt;br /&gt;
&lt;input type="text" id="textfield3" size="60" /&gt;&lt;input type="checkbox"&gt; &lt;br /&gt;
</code></pre>

<p>Once a user clicks submit, is there a way of iterating through the textinput and checkbox pair on a line by line basis?</p>

<p>for example, is it possible to somehow group the textfield and check box together and iterate through these groups going group.textfield.value =?  and group.checkbox.value = ?</p>

<p>I need an easy way to determine the text of a field and whether or not that particular field had it's check box selected</p>
