Radio button option group:   Return to List

' The example below shows 3 radio buttons and will
uncheck one when another is clicked -- because they're named the same!


<HTML>
<%
dim cars
cars=Request.Form("cars")
%>
<body>
<form action="demo_radiob.asp" method="post">
<p>Please select your favorite car:</p>
<input type="radio" name="cars"
<% if cars="Volvo" then Response.Write("checked")%>
value="Volvo">Volvo</input>

<input type="radio" name="cars"
<% if cars="Saab" then Response.Write("checked")%>
value="Saab">Saab</input>

<input type="radio" name="cars"
<% if cars="BMW" then Response.Write("checked")%>
value="BMW">BMW</input>

<input type="submit" value="Submit">
</form>

<%
if cars<>"" then
    Response.Write("<p>Your favorite car is: " & cars & "</p>")
end if
%>
</body>
</html>



Note to Webmaster