Open next form page based on response

L

L Scal

I'm creating a set of 3 forms in FP2k. When the first form is submitted the
user needs to be directed to one of the other 2 based on their response to a
Yes/No question for which I've chosen radio buttons. Does anyone know how I
can accomplish this, and collect the data from the previous page in hidden
form fields?

Here's what I tried which of course didn't work
<input type="radio" name="myName" value="Yes"
onsubmit="location.href='myfile.asp'">

Thanks
LScal
 
T

Thomas A. Rowe

You can use

<%
If request.form("myName") = "Yes" Then
Response.Redirect "page2.asp"
Else
Response.Redirect "page2.asp"
End If
%>

You can also look into using Server.Execute in place of Response.Redirect

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
L

L Scal

Thanks very much. I'm sure this is all I need, but I can't seem to get it to
work. I've tried before the header, after the header, in the custom form
handler options box, etc.
Can I put this on the page with the first form or do I have to submit it to
a page to capture the form data first then do the redirect?

LScal
 
T

Thomas A. Rowe

You have to place it on a page that you are submitting the form to.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Thomas A. Rowe

When I have had to do this, I post to a hidden page, that then does a immediate Response.Redirect to
the next page based on the value of one or more fields.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
L

L Scal

Thanks...that did it
Thomas A. Rowe said:
You have to place it on a page that you are submitting the form to.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top