Input, then redirect.

Results 1 to 2 of 2

Thread: Input, then redirect.

  1. #1
    Join Date
    Dec 1969

    Default Input, then redirect.

    I&#039m a novice with ASP as the following question will prove. I want to set up an input box on a page which, depending on the code the user inputs, will redirect them to a specific page. There are only six codes, so I&#039d like each code to redirect to it&#039s own page. If the user doesn&#039t have a code or puts in a wrong code, I&#039d like them to be redirected to a 7th page. Any ideas?

  2. #2
    Franco Guest

    Default RE: Input, then redirect.

    Scott,<BR><BR>You should use radio buttons to make sure that your users can only pick one (and only one) of the codes. This also cuts down on user typing.<BR><BR>The trick with the radio buttons is to give them a similar name (for forms) and/or id (for javascript eventhandling) and then get wherever you send the value to (eg where you submit the form to) to read that single value.<BR><BR>In your case, you can either use a form which submits the value to another page which evaluates the value and then forwards the user to the appropriate page OR you can use jscript which picks up the click event of the radio button or a "confirm"-type button and redirects the user accordingly from the same page. I would use the latter but then I know jscript (not everyone does).<BR><BR>If you want more help, drop me a line:<BR><BR>F.

Posting Permissions

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