Solved

Form redirect

Posted on 2000-03-25
9
219 Views
Last Modified: 2010-04-09
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)
0
Comment
Question by:shannon090797
9 Comments
 
LVL 2

Expert Comment

by:HolySpirit
ID: 2656802
shannon,
<form onSubmit = "top.location = 'next.htm' ; window.event.returnValue = false">
      <!-- Something here -->
<input type = submit>
</form>
-- Holy Spirit
0
 
LVL 8

Expert Comment

by:xabi
ID: 2656817
The "action" page must get the values, process them and then response.redirect to another page.

xabi
0
 
LVL 9

Expert Comment

by:TTom
ID: 2656958
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
 
LVL 1

Accepted Solution

by:
sysedco earned 100 total points
ID: 2657188
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:shannon090797
ID: 2657244
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
 
LVL 2

Expert Comment

by:Hooligan
ID: 2657341
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
 
LVL 1

Expert Comment

by:lambda
ID: 2657659

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
 
LVL 1

Expert Comment

by:lambda
ID: 2657662
sorry,

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

Missed a semicolon.
0
 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 7759676
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now