<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">You can probably use:<DIV><BR class="khtml-block-placeholder"></DIV><DIV>var ordersNumRows = document.getElementsByTagName("input").length;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>if you have to count all your input fields, then alter that value by the amount of fixed, non counted, input fields.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Otherwise, if you really want a bullet proof method, you'll have to use something like this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function countRows() {</DIV><DIV>    var orderNumRows = 0;</DIV><DIV>    var inputFields = document.getElementsByTagName("input")</DIV><DIV>    var numTag = inputFields.length;</DIV><DIV>    for (i=0; i&lt;numTag; i++) {</DIV><DIV>        if (inputFields[i].getAttribute("name") == "test[]") {</DIV><DIV>            orderNumRows++;</DIV><DIV>        }</DIV><DIV>    }</DIV><DIV>    </DIV><DIV>    alert(orderNumRows);</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This returned "2" for the following HTML:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>&lt;input name="test[]" type="text" /&gt;</DIV><DIV>&lt;input name="test[]" type="text" /&gt;</DIV><DIV>&lt;input name="other" type="text" /&gt;</DIV><DIV><DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px">Hope this helps,</P><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR class="khtml-block-placeholder"></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Julien Nadeau</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><A href="mailto:junado@junado.com">junado@junado.com</A></FONT></P>  </DIV><BR><DIV><DIV>Le 05-09-26 à 05:56, Michael Borchers a écrit :</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Michael Borchers wrote:</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">beautiful, this works so far.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the name for the inputs will be something like</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">products_id[X][products_price]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">how can i count how many rows (X) there are already?</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Triche wrote:</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If by "rows" you mean extant INPUT tags, use getElementsByTagName, then<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">loop through and count up the ones that match the stable portion of your<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">NAME attribute.</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">how exactely do i count through? javascript doesn't have a simple</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">count function for that or? :(</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">a simple</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">var ordersNumRows = count(document.getElementById("products_id[]"));</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">would have been nice;)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Javascript mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR class="Apple-interchange-newline"></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>