Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: AW: [Javascript] addin <input fields> via visibility or similar?


  • From: borchers at tridem.de (Michael Borchers)
  • Subject: AW: AW: [Javascript] addin <input fields> via visibility or similar?
  • Date: Mon Sep 26 04:55:17 2005

Michael Borchers wrote:
> 
> beautiful, this works so far.
> the name for the inputs will be something like
> products_id[X][products_price]
> 
> how can i count how many rows (X) there are already?

Triche wrote:
>If by "rows" you mean extant INPUT tags, use getElementsByTagName, then 
>loop through and count up the ones that match the stable portion of your 
>NAME attribute.

how exactely do i count through? javascript doesn't have a simple
count function for that or? :(

a simple
var ordersNumRows = count(document.getElementById("products_id[]"));

would have been nice;)