[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3277
  • Last Modified:

In Dreamweaver CS3 Forms Submit button need redirect code back to page after form is submitted to CGI server

After pages user clicks submit button on form I want the page to redirect to same page or possibly to new page on the site. What happens now is form is submitted correctly to my Hosting provider and a e-mail is sent back, just like it's should work. Problem is I get a error page on the site. Please advise code I should use for redirect.  I am using Dreamweaver CS3 Mac. to build the site.
Thank you.
1 Solution
Jason C. LevineNo oneCommented:
Hi vaughnn,

Whatever script is processing the form should have some way to set the redirect.  
What is the error you're getting?  If it's page not found, make a note of the page that it's looking for, and create that page either make it redirect using meta refresh, or have it say "thank you" or something like that.
Hi vaughnn

What you could do is a javascript redirect once the form is processed.  Lets say you have a script called process.php (or any other language).  Once its done emailing the form etc, send this output to the browser:

<script type="text/javascript">
window.location = "http://www.yoursite.com/your_page.html"

On php this can be done using the echo command as follows:

echo '<script type="text/javascript">';
echo '<!--';
echo 'window.location = "http://www.yoursite.com/your_page.html"';
echo '//-->';
echo '</script>';

You can replace the website with anything you want.  If you require the code for other scripting languages or any other info, let me know.


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now