how to validate group of textboxes in javascript
<p>I have group of check-boxes and corresponding text-boxes.I can get checkbox one by one but how to get group of texttext box.</p>

<p>my code-</p>

<pre><code>function validate_orderform(proform) 
{           
var flag=0;
for (var i = 0; i &lt; proform.chk.length; i++) {
   if (proform.chk[i].checked &amp;&amp; proform.quant[i].value=="") {       
        flag=1;
   }
}

if(flag==1){
return false;
}

return true;
}
</code></pre>

<p>html-</p>

<pre><code>&lt;td&gt;&lt;input type="checkbox" id="chk1" name="chk"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" size="10" id="quant1" name="quant1"&gt;&lt;/td&gt;...and so on
</code></pre>
