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: mdougherty at pbp.com (Mike Dougherty)
- Subject: AW: AW: [Javascript] addin <input fields> via visibility or similar?
- Date: Mon Sep 26 08:05:59 2005
I just re-read that - there should only be ONE element returned using getElementById() - by
definition, there can only be a single element with a unique ID. I pasted your example into mine,
but it probably should be a collection-returning method like getElementsByTagName() or
getElementsByName()
On Mon, 26 Sep 2005 09:01:56 -0400
"Mike Dougherty" <mdougherty@xxxxxxx> wrote:
> var loMyCol = document.getElementById("products_id[]");
> var lnCount = loMyCol.length;
>
> On Mon, 26 Sep 2005 11:56:07 +0200
> "Michael Borchers" <borchers@xxxxxxxxx> wrote:
>> 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;)
>> _______________________________________________
>> Javascript mailing list
>> Javascript@xxxxxxxxxx
>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>>
>> __________________________________________________________
>> This message was scanned by ATX
>> 5:55:27 AM ET - 9/26/2005
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
> __________________________________________________________
> This message was scanned by ATX
> 8:59:54 AM ET - 9/26/2005
- References:
- AW: AW: [Javascript] addin <input fields> via visibility or similar?
- From: Michael Borchers
- AW: AW: [Javascript] addin <input fields> via visibility or similar?
- From: Mike Dougherty
- AW: AW: [Javascript] addin <input fields> via visibility or similar?
- Prev by Date: [Javascript] createElements()
- Next by Date: [Javascript] Order of script-processing
- Previous by thread: AW: AW: [Javascript] addin <input fields> via visibility or similar?
- Next by thread: AW: AW: AW: [Javascript] addin <input fields> via visibility orsimilar?
- Index(es):