Free web development scripts for the webmasterDevelopment Scripts


 
 Site Navigation
 o Development Scripts
 o Text Only Edition
 o PHP.net News
 o Tutorials
 o Register an account
 o New entries this week
 o Affiliates/Links
 o Contact Us
 o About us
 o Advanced Search

 Browse Path
 o 1 user online
 o Most users online: 67
 o Home
  o ASP
   o Redirection/Links
    o Script

 Member Login
User Name
Password

 Standards
Valid XHTML 1.0!
Valid 
CSS!

 Recommended Links
 o PHP Freaks
 o Designer Baby Clothes
 o White Watch Store
 o iPad 64gb 3g
 o Free Wedding Websites
 o OxyScripts
 o UK Business Franchises
 o Invoice Software
 o Invoice Software

Radio choice redirect (Rated 4)

Description:

You can use this simple ASP snippet to redirect a visitor to another page depending on what choice they make with a radio button

Code starts here


<% @Language="VBScript"%>
<%
Option Explicit
%>
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->

<%
' coded by Utopia
' http://www.designplace.org/

' a sub that redirects based on radio choice
Sub redirectMe()

' declare a variable for the choice
dim strChoice
' give the variable the value of the choice
strChoice = Request.Form("choice")

' if strChoice isnt empty
if strChoice <> "" then

' start a select case statement to decide where we redirect to
select case strChoice
case "1"
response.redirect "http://www.designplace.org/index.php"
case "2"
response.redirect "http://www.designplace.org/scripts.php"
case "3"
response.redirect "http://www.designplace.org/forum/"
case else
response.write "something else was chosen..."
end select

end if

End Sub
%>

<html>
<head>
<title>Utopia is my hero</title>
</head>

<body>
<form method="post">
1.) <input type="radio" name="choice" value="1" />
2.) <input type="radio" name="choice" value="2" />
3.) <input type="radio" name="choice" value="3" />
<input type="submit" value="submit" />
</form>
<%
' call our sub
call redirectMe()
%>
</body>
</html>


Submitted by Devscripts on 23-02-2003 22:44


Recent Additions (from all categories)

(PHP) T Shirt Printing Software

(PHP) Youtube Video Organizer Script

(PHP) MP3z - MP3 Search Engine Script

(PHP) Recipez- PHP Recipe Script

(ASP) Stop image hotlinking and downloading. Web image protection is easy with Image Trapper.

Top Rated Scripts

(Javascripts) Javascript Delayed Redirection Rating: 5

(PHP) Random Links and images with PHP & MySQL Rating: 5

(PHP) RSS/XML news feed headline grabber! Rating: 5

(PHP) Random Signatures/Avatars Rating: 5

(Javascripts) Detecting Client Web Browser Rating: 5

© Copyright 2003 - Devscripts.net