Solved

Form redirect

Posted on 2000-03-25
9
218 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
Comment Utility
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
Comment Utility
The "action" page must get the values, process them and then response.redirect to another page.

xabi
0
 
LVL 9

Expert Comment

by:TTom
Comment Utility
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
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:shannon090797
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
sorry,

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

Missed a semicolon.
0
 
LVL 4

Expert Comment

by:Oliver_Dornauf
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 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

14 Experts available now in Live!

Get 1:1 Help Now