Collections and maximum Count/Length

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan Flynn

    Collections and maximum Count/Length

    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(ro wid).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.Co unt

    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

    #2
    Re: Collections and maximum Count/Length

    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" <dflynn@standis hmellon.com> a écrit dans le message de
    news:a2927743.0 405240906.5b16e bb@posting.goog le.com...[color=blue]
    > 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(ro wid).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.Co unt
    >
    > 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[/color]


    Comment

    • Dave Anderson

      #3
      Re: Collections and maximum Count/Length

      Dan Flynn wrote:[color=blue]
      > 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(ro wid).length
      >
      > However, if the number of rows with the same ID is greater than 8, it
      > always returns 8 (not 9, 10, etc.)[/color]

      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.


      [color=blue]
      > 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.Co unt
      >
      > This also returns a value of 8 although I know there are more elements
      > in the collection than 8.[/color]

      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":



      [color=blue]
      > Is any one aware of an issue like this? Maybe some kind of setup
      > issue with IIS?[/color]

      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.


      Comment

      Working...