Jump to content


Photo

Newbie needs help - radio buttons


  • Please log in to reply
5 replies to this topic

#1 bubble_gum

bubble_gum
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 14 May 2006 - 02:20 PM

Hi - I'm new to dreamweaver and all this sql stuff [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]

I have managed to make a site but I need some help with some radio buttons:

I have five lines of text each with four different options the user can choose (they choose one option from each line of blah blah blah text). I then have four text options for each line. Each option has a radio button next to it so the user can choose the option they want for each line.

blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4
blah blah blah - Option1 - Option2 - Option3 - Option4

The blah blah blah is from a field in my sql table and the text for my options 1 - 4 are also fields from my table. They are all repeated via a 'repeat region' set out in a table on my form. but heres my problem:

If I add the radio buttons and call them Q1, Q2, Q3, Q4 when they get repeated and I end up with all 20 buttons (four for each line as required) I can't choose one from each line going across but I can choose just one going downwards but thats the opposite to what I need.

If I call them all Q1 I can only choose one at a time out of the 20 I have

Any Ideas? [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]


#2 _will

_will
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 14 May 2006 - 06:06 PM

Try naming all of the radio buttons for the same question the same name, but give each radio a different value.

blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>
blah blah blah <name=Q2 val=1> <name=Q2 val=2> <name=Q2 val=3> <name=Q2 val=4>
....

This should make it so you can select one radio button for each row.


#3 bubble_gum

bubble_gum
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 14 May 2006 - 06:43 PM

[!--quoteo(post=373805:date=May 14 2006, 01:06 PM:name=_will)--][div class=\'quotetop\']QUOTE(_will @ May 14 2006, 01:06 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Try naming all of the radio buttons for the same question the same name, but give each radio a different value.

blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>
blah blah blah <name=Q2 val=1> <name=Q2 val=2> <name=Q2 val=3> <name=Q2 val=4>
....

This should make it so you can select one radio button for each row.
[/quote]

I've tried that but I can only set the top line:
blah blah blah <name=Q1 val=1> <name=Q1 val=2> <name=Q1 val=3> <name=Q1 val=4>

because the other rows in the table are generated on runtime using 'repeat region'

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 May 2006 - 06:48 PM

[!--quoteo(post=373813:date=May 14 2006, 02:43 PM:name=bubble_gum)--][div class=\'quotetop\']QUOTE(bubble_gum @ May 14 2006, 02:43 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I've tried that but I can only set the top line ... because the other rows in the table are generated on runtime using 'repeat region'[/quote]
Does that mean your 'editor' is too smart to allow you to edit your own code????

Legend has it that reading the manual never killed anyone.
My site

#5 bubble_gum

bubble_gum
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 14 May 2006 - 07:09 PM

lol [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]

No what i mean is I made a table with 1 row and 5 colums:

questiontext-------answer1---------answer2--------answer3--------answer4

In each of the columns that contains answer1 - 4 there is also a radio button (all some name but values 1 - 4)

From here I put a 'repeat region' around the table so on run time I can view all 5 questions (one per row) and all 20 radio buttons and answers (4 of each per row)

So I can't name the radio buttons for each line sepretatly as they are just repeats of the first row

Any ideas?

also is there a way to add attachments onto my post so I can show you a screenshot?

#6 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 May 2006 - 07:18 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]From here I put a 'repeat region' around the table so on run time ...[/quote]
Sorry if this seems like a really dumb question, but 'repeat region' is what? An ASP thing? A Dreamweaver thing? Some kind of server behaviour? Some kind of shortcut coding technique? If it's uncontrollable then don't use it. Isn't there any documentation with this whatever it is that explains how to do the perfectly simple task you're trying to do?

Isn't the answer to getting what you want in your code to actually write the code instead of using an automated tool that doesn't allow you to get the code you want?
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users