Collections and maximum Count/Length

D

Dan Flynn

I am working on a project that requires me to check the number of rows
in a table with the same HTML "ID" value.

I do this in my code with:

i = document.all(rowid).length

However, if the number of rows with the same ID is greater than 8, it
always returns 8 (not 9, 10, etc.)

Also, I am seeing a similiar response in a 2nd page when I attempt to
get the number of elements in the Form collection

i = Request.Form.Count

This also returns a value of 8 although I know there are more elements
in the collection than 8.

Is any one aware of an issue like this? Maybe some kind of setup
issue with IIS?

Please help.

Thanks.
I am hoping this is a
 
P

Patrice

More than really weird. Double check the names (and this is the name
attribute rather than the id at least server side). Are they all inside the
same form tag ?

If you can't find try just the simplest code possible to see if you have the
same problem (basically a loop that renders 10 fields).

Patrice
 
D

Dave Anderson

Dan said:
I am working on a project that requires me to check the number of rows
in a table with the same HTML "ID" value.

I do this in my code with:

i = document.all(rowid).length

However, if the number of rows with the same ID is greater than 8, it
always returns 8 (not 9, 10, etc.)

What behavior do you expect from document.all? And why do you think a
browser should tolerate such abuse of the ID attribute? When uniqueness is
the specification, violating it entitles us to little indignation.


Also, I am seeing a similiar response in a 2nd page when I attempt to
get the number of elements in the Form collection

i = Request.Form.Count

This also returns a value of 8 although I know there are more elements
in the collection than 8.

What do you see if you dump Request.Form to the Response stream?

ex: Response.Write(Request.Form)

For that matter, are you depending entirely on the ID attribute, or are your
form elements utilizing NAME? In HTML4, NAME is required for a "successful
control":
http://www.w3.org/TR/html401/interact/forms.html#successful-controls


Is any one aware of an issue like this? Maybe some kind of setup
issue with IIS?

I have never seen IIS truncate the Request.Form collection. I can only
assume the browser is not sending anything else.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top