Click to See Complete Forum and Search --> : Load HTML


Kobushinokami
07-24-2003, 07:44 PM
Hi. I asked this yesterday but i didnt make myself clear, so I will try again.

I make a form for a site. I want this form to be e-mailed to me once the user clicks the submit button. I know how to do that.

What I need is, that once the user clicks the button, the form be emailed to me, and then I want another HTML to be loaded, like a "Thank you" thingy...

Thaks so much for your help.

xataku_nakusute
07-24-2003, 07:59 PM
try this:

<script type="text/javascript">
function thankyou()
{
location="http://www.thankyoupage.com"
}
</script>

..............then, where your button is.....

<input type=submit" onclick="youremailfunction(); thankyou()">

DJRobThaMan
07-25-2003, 11:17 AM
Why not, just for less code to right, put the mailto:.... for your email in the action attribute of the form tag and then have the onClick just do the thank you.

pyro
07-25-2003, 11:47 AM
Unless you use server side code (such as PHP, Perl, etc) it will not work reliably in all browsers. Of course, neither will the form mailing part, so...