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!

Radio Button - true or false

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US

Hi all, here's my question.

I have a form with two radio buttons yes and no. I need to know how to code if the YES button is selected I want to redirect to a Approval Page if the no button is selected to a Not Approved Page. I'm not sure how to do this. Any help is appreciate it. Thanks
QUOTE OF THE DAY
Don't waste time telling people what you are doing or what you are going to do. Results have a way of informing the world.

<%
Jr Clown :eek:)
%>
 
Why not just make a &quot;yes&quot; and &quot;no&quot; buttons? Each button directs to a different page.
<input type=&quot;button&quot; value=&quot;Yes&quot; onClick=&quot; type=&quot;button&quot; value=&quot;No&quot; onClick=&quot;
Otherwise...if you really want the radio buttons, make them a form and request them on the next page to redirect to the page you want:

==== yesNo.asp ========
<form action=&quot;yesNoDone.asp&quot; method=&quot;post&quot;>
<font size=&quot;2&quot;>Yes</font><input type=&quot;radio&quot; value=&quot;yes&quot; name=&quot;yesno&quot;><br>
<font size=&quot;2&quot;>No</font><input type=&quot;radio&quot; value=&quot;no&quot; name=&quot;yesno&quot;><br>
<input type=&quot;submit&quot; value=&quot;Submit&quot;><input type=&quot;reset&quot; value=&quot;Reset&quot;>
</form>

==== yesNoDone.asp ==========
<%
Dim yesno
yesno = request.form(&quot;yesno&quot;)

if yesno = &quot;yes&quot; then
response.redirect(&quot;yes.asp&quot;)
else
response.redirect(&quot;no.asp&quot;)
end if

%>

-Ovatvvon
 

Thanks Ovatvvon, I will look in to both options and use the best suited for my page. I appreciate your input bud. QUOTE OF THE DAY
Don't waste time telling people what you are doing or what you are going to do. Results have a way of informing the world.

<%
Jr Clown :eek:)
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top