navigating radio buttons to another asp page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nehashri
    New Member
    • Jan 2007
    • 49

    navigating radio buttons to another asp page

    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
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    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.as p">Start Page
    <input type="radio" name="nextPage" value="page2.as p">second Page
    <input type="radio" name="nextPage" value="page3.as p">third Page
    <input type="radio" name="nextPage" value="page4.as p">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
    Code:
    response.write request.form("nextPage")
    would print out "page2.asp"
    So if you wanted to redirect to this address, just say:
    Code:
    response.redirect "/"& request.form("nextPage")
    Jared

    Comment

    • nehashri
      New Member
      • Jan 2007
      • 49

      #3
      Jared

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

      neha

      Comment

      Working...