PDA

View Full Version : After form is submitted



Anonymous
05-24-2005, 03:54 PM
Hi,

Is there any way for me to add a thank you page to be displayed after a visitor submits a form.

Rgds,
Luis

Pablo
05-24-2005, 05:45 PM
Yes, see my comments in this discussion:
http://www.vodahost.com/nb/viewtopic.php?t=286
You can also use a client side javascript to 'catch' the OnSubmit event, but this doesn't work for every browser.

Pablo

Anonymous
05-24-2005, 07:09 PM
Where can I find that javscript? I dont want to replace the form I just need a way to let the visitor know that their request was processed.

Luis

Pablo
05-24-2005, 08:31 PM
This is an example of a javascript that might work:

<SCRIPT language=JAVASCRIPT>
function DoRedirectEmailForm(theForm)
{
theForm.action = "mailto:webmaster@yourdomain.com?subject=Put the subject here";
location.href = "thankyou.html";
return true;
}
</SCRIPT>

and change the form code to something like this:

<FORM name=FormName onsubmit="JavaScript:return DoRedirectEmailForm(this);"
method=post encType=text/plain>

Note: You will have to use the HTML code feature of BlueVoda to make these changes. But as I said before, you probably will be much better off using a PHP script.