Current location: Hot Scripts Forums » Programming Languages » ASP » radio button selection


radio button selection

Reply
  #1 (permalink)  
Old 08-31-03, 01:26 PM
TheLaughingBandit TheLaughingBandit is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
radio button selection

i have used asp to produce six variables
Set1
Set2
Set3
Set4
Set5
Set6

now i want to put those into a datebase in 6 different plases
using radio button forms. Here is my problem, i dont want more than one radio button chose per form (easy already done in the code below) but i also dont want a variable (se1, set2, etc) chosen in more than one form. Then i want to submit them all at once with one button.

<form method="POST" name= "a" action="insert.asp">
<input type="radio" name="a" value="<%=set1%>">Set 1
<input type="radio" name="a" value="<%=set2%>">Set 2
<input type="radio" name="a" value="<%=set3%>">Set 3
<input type="radio" name="a" value="<%=set4%>">Set 4
<input type="radio" name="a" value="<%=set5%>">Set 5
<input type="radio" name="a" value="<%=set6%>">Set 6
</form>
<form method="POST" name= "b" action="insert.asp">
<input type="radio" name="b" value="<%=set1%>">Set 1
<input type="radio" name="b" value="<%=set2%>">Set 2
<input type="radio" name="b" value="<%=set3%>">Set 3
<input type="radio" name="b" value="<%=set4%>">Set 4
<input type="radio" name="b" value="<%=set5%>">Set 5
<input type="radio" name="b" value="<%=set6%>">Set 6
</form>
<form method="POST" name= "c" action="insert.asp">
<input type="radio" name="c" value="<%=set1%>">Set 1
<input type="radio" name="c" value="<%=set2%>">Set 2
<input type="radio" name="c" value="<%=set3%>">Set 3
<input type="radio" name="c" value="<%=set4%>">Set 4
<input type="radio" name="c" value="<%=set5%>">Set 5
<input type="radio" name="c" value="<%=set6%>">Set 6
</form>
<form method="POST" name= "d" action="insert.asp">
<input type="radio" name="d" value="<%=set1%>">Set 1
<input type="radio" name="d" value="<%=set2%>">Set 2
<input type="radio" name="d" value="<%=set3%>">Set 3
<input type="radio" name="d" value="<%=set4%>">Set 4
<input type="radio" name="d" value="<%=set5%>">Set 5
<input type="radio" name="d" value="<%=set6%>">Set 6
</form>
<form method="POST" name= "e" action="insert.asp">
<input type="radio" name="e" value="<%=set1%>">Set 1
<input type="radio" name="e" value="<%=set2%>">Set 2
<input type="radio" name="e" value="<%=set3%>">Set 3
<input type="radio" name="e" value="<%=set4%>">Set 4
<input type="radio" name="e" value="<%=set5%>">Set 5
<input type="radio" name="e" value="<%=set6%>">Set 6
</form>
<form method="POST" name= "f" action="insert.asp">
<input type="radio" name="f" value="<%=set1%>">Set 1
<input type="radio" name="f" value="<%=set2%>">Set 2
<input type="radio" name="f" value="<%=set3%>">Set 3
<input type="radio" name="f" value="<%=set4%>">Set 4
<input type="radio" name="f" value="<%=set5%>">Set 5
<input type="radio" name="f" value="<%=set6%>">Set 6
</form>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-31-03, 01:48 PM
Mister B.'s Avatar
Mister B. Mister B. is offline
Wannabe Coder
 
Join Date: Jul 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
make them all into one form, there is no need to seperate them unless they are going to different pages.

form method="POST" name= "radio form" action="insert.asp">
<input type="radio" name="a" value="set1">Set 1
<input type="radio" name="a" value="set2">Set 2
<input type="radio" name="a" value="set3">Set 3
<input type="radio" name="a" value="set4">Set 4
<input type="radio" name="a" value="set5">Set 5
<input type="radio" name="a" value="set6">Set 6

<input type="radio" name="b" value="<%=set1%>">Set 1
<input type="radio" name="b" value="<%=set2%>">Set 2
<input type="radio" name="b" value="<%=set3%>">Set 3
<input type="radio" name="b" value="<%=set4%>">Set 4
<input type="radio" name="b" value="<%=set5%>">Set 5
<input type="radio" name="b" value="<%=set6%>">Set 6

<input type="radio" name="c" value="<%=set1%>">Set 1
<input type="radio" name="c" value="<%=set2%>">Set 2
<input type="radio" name="c" value="<%=set3%>">Set 3
<input type="radio" name="c" value="<%=set4%>">Set 4
<input type="radio" name="c" value="<%=set5%>">Set 5
<input type="radio" name="c" value="<%=set6%>">Set 6

<input type="radio" name="d" value="<%=set1%>">Set 1
<input type="radio" name="d" value="<%=set2%>">Set 2
<input type="radio" name="d" value="<%=set3%>">Set 3
<input type="radio" name="d" value="<%=set4%>">Set 4
<input type="radio" name="d" value="<%=set5%>">Set 5
<input type="radio" name="d" value="<%=set6%>">Set 6

<input type="radio" name="e" value="<%=set1%>">Set 1
<input type="radio" name="e" value="<%=set2%>">Set 2
<input type="radio" name="e" value="<%=set3%>">Set 3
<input type="radio" name="e" value="<%=set4%>">Set 4
<input type="radio" name="e" value="<%=set5%>">Set 5
<input type="radio" name="e" value="<%=set6%>">Set 6

<input type="radio" name="f" value="<%=set1%>">Set 1
<input type="radio" name="f" value="<%=set2%>">Set 2
<input type="radio" name="f" value="<%=set3%>">Set 3
<input type="radio" name="f" value="<%=set4%>">Set 4
<input type="radio" name="f" value="<%=set5%>">Set 5
<input type="radio" name="f" value="<%=set6%>">Set 6
<input type="submit" name="submit" value="sendum!">
</form>

then on your react page just say for eg
RS("f") equals (however you do this is up to you)
Request.form("f")
and you will get the set number in the DB.
also note, in the top set I removed the <%= bit, this is redundant, unless set1 is a variable.
__________________
God save us from the religious fanatics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-31-03, 03:46 PM
TheLaughingBandit TheLaughingBandit is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
meybe i am missunder stang your responce or perhaps i explain well enough what i wanted.

here is what i want
--X-----0------0------0------0------0
set1---set2---set3---set4---set5---set6

--0-----X------0------0------0------0
set1---set2---set3---set4---set5---set6

--0-----0------X------0------0------0
set1---set2---set3---set4---set5---set6

--0-----0------0------X------0------0
set1---set2---set3---set4---set5---set6

--0-----0------0------0------X------0
set1---set2---set3---set4---set5---set6

--0-----0------0------0------0------X
set1---set2---set3---set4---set5---set6


Here is what i dont want
--X-----X------0------0------0------0
set1---set2---set3---set4---set5---set6

--X-----X------0------0------X------0
set1---set2---set3---set4---set5---set6

--0-----0------X------0------0------0
set1---set2---set3---set4---set5---set6

--X-----X------X------X------X------X
set1---set2---set3---set4---set5---set6

--0-----0------0------0------0------0
set1---set2---set3---set4---set5---set6

--X-----0------0------0------0------X
set1---set2---set3---set4---set5---set6

run your code, you cant select more than one per group, that is good (but i had that in my code) but just as in my code you can still select say set4 for for all six groups, thats bad. then i also want a validaton so none are left blank.
thanks any way, please let me know if you have any more ideas.

Last edited by TheLaughingBandit; 08-31-03 at 03:54 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-31-03, 07:22 PM
Mister B.'s Avatar
Mister B. Mister B. is offline
Wannabe Coder
 
Join Date: Jul 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
okay, so you want it, so that you can't have more than one of the same things for that you would have to use javascript... I might be able to help you, but not right now, I am going out.
__________________
God save us from the religious fanatics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable browser's back button after logout shaky ASP 7 08-18-06 08:37 AM
image submit button problems Pepe PHP 10 12-22-03 09:15 PM
Radio Button selection TheLaughingBandit JavaScript 0 08-31-03 01:25 PM
Help with radio buttons and uploading Arctic ASP 3 08-17-03 10:49 AM
Looking for a radio station scripts for Linux - apache server (PHP.prefrd). Dudez Script Requests 1 08-05-03 11:34 AM


All times are GMT -5. The time now is 10:12 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.