Connecting Tech Pros Worldwide Forums | Help | Site Map

navigating radio buttons to another asp page

nehashri's Avatar
Member
 
Join Date: Jan 2007
Location: mumbai
Posts: 49
#1: Jun 4 '07
hello

can any one please tell how to navigate or redirect radio buttons in a asp page to another asp page by vb script...
i have four radio buttons when one of the them is choosen and submit button is click it should redirect to that perticular page..

thanks
neha

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Jun 4 '07

re: navigating radio buttons to another asp page


This kind of thing is usually done in javascript, but doing it in asp adds the benefit of being able to have one script that collects the data and sending you on to the individual result pages.

First off, how is the data sent to the answering script? If the radio buttons are set up like this:
[html]<input type="radio" name="nextPage" value="page1.asp">Start Page
<input type="radio" name="nextPage" value="page2.asp">second Page
<input type="radio" name="nextPage" value="page3.asp">third Page
<input type="radio" name="nextPage" value="page4.asp">final Page
[/html]

Then the data is sent to the answering script the same way it would be sent from a drop-down <select>. If you selected page2.asp, then
Expand|Select|Wrap|Line Numbers
  1. response.write request.form("nextPage")
would print out "page2.asp"
So if you wanted to redirect to this address, just say:
Expand|Select|Wrap|Line Numbers
  1. response.redirect "/"& request.form("nextPage")
Jared
nehashri's Avatar
Member
 
Join Date: Jan 2007
Location: mumbai
Posts: 49
#3: Jun 5 '07

re: navigating radio buttons to another asp page


Jared

thanks I did it through java scripts and its working fine.

neha
Reply