<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; khtml-nbsp-mode: space; khtml-line-break: after-white-space">
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2>function
countRows() {<BR> var ordersNumRows = 0;<BR>
var inputFields = document.getElementsByTagName("select")<BR>
var numTag = inputFields.length;<BR> for (i=0; i<numTag;
i++) {<BR> if
(inputFields[i].getAttribute("name") == "products_id[" + i + "][products_id]")
{<BR>
ordersNumRows++;<BR>
}<BR> }<BR> <BR>
alert(ordersNumRows);<BR>}<SPAN
class=212433408-28092005> </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>actually this does
work.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>but the problem is:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>as soon there is a different <select> before the
selects i am searching for,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>var numTag = inputFields.length; seems to stop
counting:(</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>f.e.:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><select name="products_id[0][products_id]"
id="products_id[0][products_id]"></select><BR><select
name="products_id[1][products_id]"
id="products_id[1][products_id]"></select></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN class=212433408-28092005><select
name="orders_status_id"
id="orders_status_id"></select><BR></SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>= works fine, result:
2 </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN class=212433408-28092005><select
name="orders_status_id"
id="orders_status_id"></select></SPAN></SPAN></FONT></FONT></FONT></DIV></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><select name="products_id[0][products_id]"
id="products_id[0][products_id]"></select><BR><select
name="products_id[1][products_id]"
id="products_id[1][products_id]"></select></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN
class=212433408-28092005></SPAN></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN class=212433408-28092005>= stops counting,
result: 0</SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN
class=212433408-28092005></SPAN></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=212433408-28092005><SPAN class=212433408-28092005>can i suite the var
inputFields somehow?!</SPAN></SPAN></FONT></FONT></FONT></DIV></DIV></BODY></HTML>