If the hidden field is NOT empty, how do I redirect?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maryjane9110024
    New Member
    • Sep 2007
    • 3

    If the hidden field is NOT empty, how do I redirect?

    I have a form that I created a hidden text field. I want to be able to send the person to an error page if that field has some kind of value, nothing specific, just as long as its not empty. I tried a js code in the validation file but that did not work. I tried to set up an if statement in the process file but I don't know what I am doing or did wrong. Please someone help!!
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi maryjane,

    Try this in your ASP page.
    Code:
    If Not Request("HiddenFieldName")  = "" Then Response.Redirect("ErrorPage.asp")
    Hope this helps,

    Dr B

    Comment

    • maryjane9110024
      New Member
      • Sep 2007
      • 3

      #3
      Originally posted by DrBunchman
      Hi maryjane,

      Try this in your ASP page.
      Code:
      If Not Request("HiddenFieldName")  = "" Then Response.Redirect("ErrorPage.asp")
      Hope this helps,

      Dr B


      THANK YOU!!! It worked!!
      mj

      Comment

      Working...