Form Processing [Wrong Forum]

E

Erin Gray

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.
 
A

Adrienne Boswell

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.
 
T

Thomas

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.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed "Thomas"
<[email protected]> writing in

Please do not top post... posting corrected
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.
 
N

Neil Gould

Thomas said:
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
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top