Click to See Complete Forum and Search --> : Form submit - link question


zj8674
01-23-2003, 05:41 PM
I'm really really new to this...

I have a form on my page that sends me an email with the "action" command (i.e. action=mailto:myemail@mydomain.com")

What I want is for the user to see a new webpage upon clicking submit. So I want to receive the email AND redirect the user to a new webpage. Is this done with JAVA or CGI scripting only or can it be done with just HTML?

Help!! Thanks!:confused: :confused:

jdavia
01-23-2003, 09:33 PM
You might try this:
<A HREF="mailto:myemail@mydomain.com" target="top" onClick="location='mydomain.html'"">click here</a>
An experiment, but it worked in IE. NS opened the window minimized

zj8674
01-24-2003, 10:06 AM
Thanks, but where would I put that? I don't want a mailto link, I want a form action command. Right now it looks like this:

<form method="post" action="mailto:myemail@myemail.com?subject=form information" enctype="text/plain">

which produces a pop up warning box about your email address being sent, etc., then when the user clicks "Continue", it emails me the form information, but then the page just stays there. I want the page to go to another URL that says "Thank you for your interest" etc.

I don't think an HREF command would do it...

jpmoriarty
01-24-2003, 10:22 AM
you shouldnt use a mailto then - you need a cgi mailing script which does all the work for you. If you use the mailto command then because it uses your default mail client it makes it difficult to make it do what you want - and if the viewer doesnt have a mail client, then it wont let you send it.

Search around on google or wherever and get a cgi mail script, and then put that in your cgi bin on your site: not everyone's allowed to do that though, so you might be a bit stuck.

I've been told not to suggest him before, but I'll say again that you can probably get one at matt's script acrhive (http://www.scriptarchive.com) - it is there, i've just checked. It's called form mail and it lets you specify all those things you want above.

zj8674
01-24-2003, 10:25 AM
Thanks...

I just tried it by adding an "onclick="location='mydomain.html'" to the button properties, and it seems to work so far... The mail client thing may be an issue, but I guess that's okay for now.

Thanks everyone.

jdavia
01-24-2003, 04:48 PM
This is what I just tried out that works.

<form method="post" action="mailto:myemail@mydomain.com" target="top"
onClick="location='mydomain.html'"?subject=form
information" enctype="text/plain"><input type="submit" value="zj8674"onclick="checkFlag();"></center>
</form>