var ordersNumRows = 0; var inputFields = document.orders.getElementsByTagName("select") var numTag = inputFields.length; for (i=0; i<numTag; i++) { if (inputFields[i].getAttribute("name").substring(0,11) == "products_id") { ordersNumRows++; } } ok, this is the way it works fine, since none of my other selects in the form starts with "products_id". maybe there's a possibility to do it by changing the var inputFields?! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050928/d31d7303/attachment.htm>