Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting user input from radio button. 1

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
SG
hi all,

i have a set of radio buttons like this.

<input type=&quot;radio&quot; checked name=&quot;rRadio&quot;> Radio1 <br>
<input type=&quot;radio&quot; name=&quot;rRadio&quot;> Radio2 <br>
<input type=&quot;radio&quot; name=&quot;rRadio&quot;> Radio3 <br>

so using server scripting, how do i know which of the radio button was checked??

by using Request.Form(&quot;rRadio&quot;), i get &quot;on&quot; as return value. Not much use for that value.

Pls help. Many Thanks.
 
you need to set values to each of the radio buttons. Right now, none of them have values, so what is the significance of which one the user selects?

You have them seperated by the text that the user can see, but not by values, if you want what the user see's, to be passed, then set the value to the same thing, like so:


<input type=&quot;radio&quot; name=&quot;rRadio&quot; value=&quot;Radio1&quot; CHECKED> Radio1 <br>
<input type=&quot;radio&quot; name=&quot;rRadio&quot; value=&quot;Radio2&quot;> Radio2 <br>
<input type=&quot;radio&quot; name=&quot;rRadio&quot; value=&quot;Radio3&quot;> Radio3 <br>


Try this and let me know if it works.
-Ovatvvon :-Q
 
Althrough i found that out before seeing you message but i still wanna thank you.

Now, i can get the values by....

rr = Request.Form(&quot;rRadio&quot;)

and rr would be of value either Radio2 or Radio3.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top