Collections and maximum Count/Length

Discussion in 'ASP General' started by Dan Flynn, May 24, 2004.

  1. Dan Flynn

    Dan Flynn Guest

    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
     
    Dan Flynn, May 24, 2004
    #1
    1. Advertising

  2. Dan Flynn

    Patrice Guest

    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


    "Dan Flynn" <> a écrit dans le message de
    news:...
    > 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
     
    Patrice, May 24, 2004
    #2
    1. Advertising

  3. Dan Flynn wrote:
    > 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.
     
    Dave Anderson, May 24, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacky Kwok
    Replies:
    2
    Views:
    3,570
    Mark1969
    Jun 24, 2005
  2. Chris Hayes
    Replies:
    0
    Views:
    667
    Chris Hayes
    Jul 27, 2005
  3. Doug Poland
    Replies:
    9
    Views:
    736
    VisionSet
    Sep 27, 2003
  4. mutex
    Replies:
    0
    Views:
    216
    mutex
    Jul 27, 2003
  5. phanhuyich
    Replies:
    4
    Views:
    280
Loading...

Share This Page