vaughnn
asked on
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.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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"
//-->
</script>
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.
CoolHaxord
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"
//-->
</script>
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.
CoolHaxord