Form redirect

Is there an easy way to direct a visitor to another page after he has filled out a form and hit submit?

I have a simple 2 line form I want the visitor to fill in and submit, then redirect him to the next page?

Thanks,
Dave
P.S. I don't write cgi or java scripts. (yet)
shannon090797Asked:
Who is Participating?
 
sysedcoConnect With a Mentor Commented:
The easiest thing to do is go to:

http://www.cgi-resources.com

go into the Script section and then into the Perl section.

Look in the Redirectors section and see if you find something that sounds good.

Tom Carpenter
http://www.sysedco.com

http://www.techrover.com - The Technical Article Search Engine
0
 
HolySpiritCommented:
shannon,
<form onSubmit = "top.location = 'next.htm' ; window.event.returnValue = false">
      <!-- Something here -->
<input type = submit>
</form>
-- Holy Spirit
0
 
xabiCommented:
The "action" page must get the values, process them and then response.redirect to another page.

xabi
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
TTomCommented:
This has got to be more sophisticated than just a "simple" two line form.  If this is some sort of registration or login page, you are going to want to verify/store this information.

Depending on your server environment, this will require some level of scripting.

Scope out your requirements more fully, and perhaps we can provide an acceptable solution.

Tom
0
 
shannon090797Author Commented:
OK.  This is a two line form.
Name
E-mail address
then
Post to the email account on submit.

Then go to next page and continue.

Dave
0
 
HooliganCommented:
if this is as simple as you make it seem, then you can have the form submit to the next page itself.  as in:

<form name = 'fooBar' action = 'myNextPage.htm' method = 'post'>
<!--your form fields here-->
</form>

if you actually need to do some processing on the form, you can submit it to either itself or to the next page, and then do a metatag refresh as in:

page1.htm-

<form name = 'fooBar' action = 'myNextPage.htm' method = 'post'>
<!--your form fields here-->
</form>

page2.htm
<html>
<head>
<!--whatever processing you need done-->
<meta http-equiv="refresh" content="4;URL=http://www.myurl.com/theNextPage.htm">
</head>
<body>
Thanks for your submission, you will be redirected to theNextPage.htm in 4 seconds.
</body>
</html>

dunno if that helps, and I may very well have misunderstood the question <g>
Good Luck
0
 
lambdaCommented:

HTML page
---------

<form name = 'fooBar' action = '/cgi-bin/pgm.cgi' method = 'post'>
<!--your form fields here-->
</form>


pgm.cgi
-------

#!/usr/bin/perl

## procedure for sending mail
## .....

print "Content-type: text/html\n";
print "Location: http://www.myurl.com/theNextPage.htm\n\n"


Is this what you want...?
0
 
lambdaCommented:
sorry,

print "Location: http://www.myurl.com/theNextPage.htm\n\n";

Missed a semicolon.
0
 
Oliver_DornaufCommented:
you can use an an HTTP 307 to redirect an post request.
Look at www.pda-systems.com they have an tutorial that uses this request.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.