Buzz
April 16th, 2001, 01:50 AM
i'm having a bit of a problem.
I'm trying to mail a form then redirect the page in javascript.
I can get the form to mail easily enough with a mailto: form action, and I can get the redirect to work with a submit function. the problem I have is I can't get both to work at the same time.
Now I know i could use a cgi script for this but I really want to try and get it working with just javascript/dhtml.
I've also tried a graphic submitbutton that calls the function to submit then redirect.
i.e.:
function doSubmit () {
document.forms[0].submit()
location = "page.html"
}
I can't get that working either.
Any help would be appreciated. Thanks
I'm trying to mail a form then redirect the page in javascript.
I can get the form to mail easily enough with a mailto: form action, and I can get the redirect to work with a submit function. the problem I have is I can't get both to work at the same time.
Now I know i could use a cgi script for this but I really want to try and get it working with just javascript/dhtml.
I've also tried a graphic submitbutton that calls the function to submit then redirect.
i.e.:
function doSubmit () {
document.forms[0].submit()
location = "page.html"
}
I can't get that working either.
Any help would be appreciated. Thanks