Form Processing [Wrong Forum]

Discussion in 'ASP General' started by Erin Gray, Apr 10, 2009.

  1. Erin Gray

    Erin Gray Guest

    I posted this in another forum (I believe was incorrect). Sorry for multiple post.

    I have an html form with 30 buttons on it. Setup like so:

    grp1, radiobutton1 (5 of these)
    grp2: radiobutton2 (5 of these)
    and so on to grp6 ...

    I am submitting it to an asp page and would like to process them in some kind of loop, by grpX then radiobuttonX

    But I don't know how (collection?) to access them.

    There are lots of great sites that show how to process a form by an item name which I can do, but the code is unwieldy.

    Any help is appreciated.

    ps: If this is the wrong forum, please let me know where to post.

    Thanks to all Erin.
     
    Erin Gray, Apr 10, 2009
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "Erin Gray"
    <> writing in
    news:#:

    > I posted this in another forum (I believe was incorrect). Sorry for
    > multiple post.
    >
    > I have an html form with 30 buttons on it. Setup like so:
    >
    > grp1, radiobutton1 (5 of these)
    > grp2: radiobutton2 (5 of these)
    > and so on to grp6 ...
    >
    > I am submitting it to an asp page and would like to process them in
    > some kind of loop, by grpX then radiobuttonX
    >
    > But I don't know how (collection?) to access them.
    >
    > There are lots of great sites that show how to process a form by an
    > item name which I can do, but the code is unwieldy.
    >
    > Any help is appreciated.
    >
    > ps: If this is the wrong forum, please let me know where to post.
    >
    > Thanks to all Erin.
    > ------=_NextPart_000_000A_01C9B99E.47CF2960


    <snip HTML - please do not post in HTML in Usenet>

    If I am reading your post correctly, you have six groups of five _radio_
    buttons. Each group can only have _one_ button checked, so you are only
    having to go through six items.

    If you are talking about checkboxes, then you will still be getting six
    arrays back, so again, only having to deal with six items.
    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Apr 10, 2009
    #2
    1. Advertising

  3. Erin Gray

    Thomas Guest

    Hello Adrienne. Yes that is correct, I believe my question is:

    How do I loop through the form elements to find out which item is checked?

    So for example my form would look like so:

    grp1: rb1, rb1,rb1,rb1,rb1 (each with different values)
    grp2: rb2, rb2,rb2,rb2,rb2

    etc...

    So if a user clicks gr1:rb1 (the second button), I need to see which one was
    checked and then extract the value for that button.

    I hope this makes sense.

    Thanks again for the reply.

    "Adrienne Boswell" <> wrote in message
    news:Xns9BE95679B26EDarbpenyahoocom@207.115.33.102...
    > Gazing into my crystal ball I observed "Erin Gray"
    > <> writing in
    > news:#:
    >
    >> I posted this in another forum (I believe was incorrect). Sorry for
    >> multiple post.
    >>
    >> I have an html form with 30 buttons on it. Setup like so:
    >>
    >> grp1, radiobutton1 (5 of these)
    >> grp2: radiobutton2 (5 of these)
    >> and so on to grp6 ...
    >>
    >> I am submitting it to an asp page and would like to process them in
    >> some kind of loop, by grpX then radiobuttonX
    >>
    >> But I don't know how (collection?) to access them.
    >>
    >> There are lots of great sites that show how to process a form by an
    >> item name which I can do, but the code is unwieldy.
    >>
    >> Any help is appreciated.
    >>
    >> ps: If this is the wrong forum, please let me know where to post.
    >>
    >> Thanks to all Erin.
    >> ------=_NextPart_000_000A_01C9B99E.47CF2960

    >
    > <snip HTML - please do not post in HTML in Usenet>
    >
    > If I am reading your post correctly, you have six groups of five _radio_
    > buttons. Each group can only have _one_ button checked, so you are only
    > having to go through six items.
    >
    > If you are talking about checkboxes, then you will still be getting six
    > arrays back, so again, only having to deal with six items.
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Services
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    >
    >
     
    Thomas, Apr 10, 2009
    #3
  4. Gazing into my crystal ball I observed "Thomas"
    <> writing in
    news::

    Please do not top post... posting corrected
    >
    > "Adrienne Boswell" <> wrote in message
    > news:Xns9BE95679B26EDarbpenyahoocom@207.115.33.102...
    >> Gazing into my crystal ball I observed "Erin Gray"
    >> <> writing in
    >> news:#:
    >>
    >>> I posted this in another forum (I believe was incorrect). Sorry for
    >>> multiple post.
    >>>
    >>> I have an html form with 30 buttons on it. Setup like so:
    >>>
    >>> grp1, radiobutton1 (5 of these)
    >>> grp2: radiobutton2 (5 of these)
    >>> and so on to grp6 ...
    >>>
    >>> I am submitting it to an asp page and would like to process them in
    >>> some kind of loop, by grpX then radiobuttonX
    >>>
    >>> But I don't know how (collection?) to access them.
    >>>
    >>> There are lots of great sites that show how to process a form by an
    >>> item name which I can do, but the code is unwieldy.
    >>>
    >>> Any help is appreciated.
    >>>
    >>> ps: If this is the wrong forum, please let me know where to post.
    >>>
    >>> Thanks to all Erin.
    >>> ------=_NextPart_000_000A_01C9B99E.47CF2960

    >>
    >> <snip HTML - please do not post in HTML in Usenet>
    >>
    >> If I am reading your post correctly, you have six groups of five
    >> _radio_ buttons. Each group can only have _one_ button checked, so
    >> you are only having to go through six items.
    >>
    >> If you are talking about checkboxes, then you will still be getting
    >> six arrays back, so again, only having to deal with six items.


    > Hello Adrienne. Yes that is correct, I believe my question is:
    >
    > How do I loop through the form elements to find out which item is
    > checked?
    >
    > So for example my form would look like so:
    >
    > grp1: rb1, rb1,rb1,rb1,rb1 (each with different values)
    > grp2: rb2, rb2,rb2,rb2,rb2
    >
    > etc...
    >
    > So if a user clicks gr1:rb1 (the second button), I need to see which
    > one was checked and then extract the value for that button.
    >
    > I hope this makes sense.
    >
    > Thanks again for the reply.


    Radio buttons can only have ONE value.
    [http://www.w3.org/TR/html401/interact/forms.html#radio]

    Please see [http://aloyaltycard.com/usenet/inputarray.asp] to see the
    difference and what is returned when submitting either form.

    Again, regardless, with radio, you get one value for each group, and with
    checkbox, you get an array for each group.


    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Apr 10, 2009
    #4
  5. Erin Gray

    Neil Gould Guest

    Thomas wrote:
    > Hello Adrienne. Yes that is correct, I believe my question is:
    >
    > How do I loop through the form elements to find out which item is
    > checked?
    >
    > So for example my form would look like so:
    >
    > grp1: rb1, rb1,rb1,rb1,rb1 (each with different values)
    > grp2: rb2, rb2,rb2,rb2,rb2
    >
    > etc...
    >
    > So if a user clicks gr1:rb1 (the second button), I need to see which
    > one was checked and then extract the value for that button.
    >
    > I hope this makes sense.
    >
    > Thanks again for the reply.
    >

    Here is a good source for learning the basics of radio buttons and other
    form elements.

    http://www.w3schools.com/html/html_forms.asp

    Best regards,

    Neil



    > "Adrienne Boswell" <> wrote in message
    > news:Xns9BE95679B26EDarbpenyahoocom@207.115.33.102...
    >> Gazing into my crystal ball I observed "Erin Gray"
    >> <> writing in
    >> news:#:
    >>
    >>> I posted this in another forum (I believe was incorrect). Sorry for
    >>> multiple post.
    >>>
    >>> I have an html form with 30 buttons on it. Setup like so:
    >>>
    >>> grp1, radiobutton1 (5 of these)
    >>> grp2: radiobutton2 (5 of these)
    >>> and so on to grp6 ...
    >>>
    >>> I am submitting it to an asp page and would like to process them in
    >>> some kind of loop, by grpX then radiobuttonX
    >>>
    >>> But I don't know how (collection?) to access them.
    >>>
    >>> There are lots of great sites that show how to process a form by an
    >>> item name which I can do, but the code is unwieldy.
    >>>
    >>> Any help is appreciated.
    >>>
    >>> ps: If this is the wrong forum, please let me know where to post.
    >>>
    >>> Thanks to all Erin.
    >>> ------=_NextPart_000_000A_01C9B99E.47CF2960

    >>
    >> <snip HTML - please do not post in HTML in Usenet>
    >>
    >> If I am reading your post correctly, you have six groups of five
    >> _radio_ buttons. Each group can only have _one_ button checked, so
    >> you are only having to go through six items.
    >>
    >> If you are talking about checkboxes, then you will still be getting
    >> six arrays back, so again, only having to deal with six items.
    >> --
    >> Adrienne Boswell at Home
    >> Arbpen Web Site Design Services
    >> http://www.cavalcade-of-coding.info
    >> Please respond to the group so others can share
     
    Neil Gould, Apr 11, 2009
    #5
    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. Randy
    Replies:
    8
    Views:
    476
    rjhilmes
    May 9, 2006
  2. Jukka K. Korpela
    Replies:
    3
    Views:
    775
    Michael Winter
    Mar 6, 2004
  3. Michael Winter
    Replies:
    4
    Views:
    590
    Lasse Reichstein Nielsen
    Mar 6, 2004
  4. Bob The ASP Builder

    Wrong forum perhaps but..

    Bob The ASP Builder, Apr 8, 2005, in forum: ASP General
    Replies:
    1
    Views:
    104
    David Morgan
    Apr 8, 2005
  5. Alexey Verkhovsky

    [Ruby Forum] Forum digest by email

    Alexey Verkhovsky, Sep 22, 2004, in forum: Ruby
    Replies:
    0
    Views:
    420
    Alexey Verkhovsky
    Sep 22, 2004
Loading...

Share This Page