Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Form redirect

Posted on 2000-03-25
9
Medium Priority
?
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
sysedco earned 400 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
 

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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…

618 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