how to load a different page..

Results 1 to 3 of 3

Thread: how to load a different page..

  1. #1
    Join Date
    Dec 1969

    Default how to load a different page..

    hi,<BR> i m trying to load a different set of pages from a drop down box. Let&#039;s say i have a page1.asp that has a drop box with three options: option1, option2, and option3. If i click option1 then it&#039;s suppose to load registrationform31.asp, and if i choose option2 then it&#039;s suppose to load internshipfair.asp. I tried the following code but it doesn&#039;t work...hope someone can help me...thanks a lot..<BR><BR> Session("SelectEv")=Request.Form("drpEName")<BR> <BR><BR>&#039;&#039; first i tried something like the code below but didn&#039;t work..<BR>dim Intern<BR>Intern=Request.Form("drpEName")<BR> If Intern.value="InternShip Fair" Then<BR> Response.Redirect("Internshipfair.asp")<BR>else Response.Redirect("RegistrationForm31.asp")<BR> end if<BR> <BR>&#039;&#039; so then i tried something like this..but still doesn&#039;t work..<BR><BR> If Session("SelectEv")="Internship Fair" Then<BR> Response.Redirect("Internshipfair.asp")<BR> else<BR> Response.Redirect("RegistrationForm31.asp")<BR> end if<BR>

  2. #2
    Join Date
    Dec 1969
    Indianapolis, IN

    Default RE: how to load a different page..

    Where are you handling the redirects? Is this on a page you are posting to from page1.asp? Assuming this is logic on a page that page1.asp posts to, you should be able to simply run if/else logic based on Request("drpEName"). I don&#039;t have a clue what you&#039;re doing with Intern.value. If you have a variable named Intern and set it to be Request.Form("drpEName"), then reference Intern, not Intern.value. And if you aren&#039;t saving things into a session variable, then comparing on such a variable won&#039;t work either.

  3. #3
    Join Date
    Dec 1969

    Default Do this is Javascript

    Why use asp to simply redirect a page?<BR><BR>Wuse the onChange method of the SELECT element to change the document location.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts