Click to See Complete Forum and Search --> : Form confirmation e-mail problem


buddybear
09-07-2003, 06:52 PM
I'm working on a form that when it is submitted to me using mailto, I want the sender taken to a page that shows confirmation that the form was sent and also shows the information submitted.
I found the following in the DrWeb archive. I placed it in the head but it doesn't work (I changed it with my information). It shows a box with the text "Enter your e-mail address". I have a submit button as part of my form. This is as the script is shown.
I also removed the <!-- -->
Any help would be appreciated.

<SCRIPT LANGUAGE="JavaScript">
<!--function doit()
{ document.moveme.submit();
document.location.href="http://www.internet.com"; }
--></SCRIPT>
<FORM METHOD=POST ACTION="mailto:you@yourdomain.com"
NAME="moveme" >
<INPUT TYPE="text"
VALUE="Enter your email address here">
<SCRIPT LANGUAGE="JavaScript">
<!-- document.write('<INPUT TYPE=BUTTON VALUE="Go" onClick=doit()>');
// --> </SCRIPT>
<NOSCRIPT>
<INPUT TYPE=Submit VALUE="Go">
</NOSCRIPT>
</FORM>

GavinPearce
09-08-2003, 01:51 AM
Tidied it up a bit, and removed a bit of unneeded JavaScript.
So long as you don't try and change it, it'll work fine from now on.


<SCRIPT LANGUAGE="JavaScript">
<!--
function doit() {
document.moveme.submit();
document.location.href="http://www.internet.com";
}
-->
</SCRIPT>
<FORM METHOD="POST" ACTION="mailto:user@domain.com" NAME="moveme">
<INPUT TYPE="text" NAME="email" VALUE="Please enter your e-mail.">
<INPUT TYPE="BUTTON" VALUE="Go" onClick="doit()">
</FORM>

buddybear
09-08-2003, 11:11 PM
Thanks for cleaning up the script. The problem I'm having with it is that when the form is submitted to me I get an attachment with the file postdata.att and I can't open it. Can it be sent as an e-mail only and not as an attachment.
Thanks again.

CyCo
09-09-2003, 08:51 AM
set your file association for the .att extension to open with notepad....
it will be an ugly string, but it is decipherable...

pyro
09-09-2003, 09:13 AM
You'd really be better off doing this server side, as I doubt the script posted will work cross browser. Take a look at this (http://www.webdevfaqs.com/php.php#mailer), if your server supports PHP.

GavinPearce
09-09-2003, 12:34 PM
open the file in notepad or any text editor, it'll make sense.

buddybear
09-09-2003, 10:03 PM
#1) I found a solution to the POSTDATA.ATT issue. I added enctype="text/plain" as in the line below and the e-mails come through correctly:
<FORM METHOD="POST" enctype="text/plain" ACTION="mailto:youremail@xxxx.com" NAME="moveme" >

#2)
When I added this script the only part of the form that is e-mailed is the text box where you enter your e-mail address. How can I get the entire form to be included in the e-mail?

Thanks.

nguyennc
09-09-2003, 10:43 PM
It's same to my concern which already posted in this forum(SUBJECT: Sending an Email) but no reply yet.

Please share with me if you have any solution

Thanks

pyro
09-09-2003, 11:01 PM
What else are you trying to get?

biggsie
09-10-2003, 02:09 PM
Thanks guys for this... I have used some of your suggestions and they have helped.

I have put together a form for people to request a Video and some information.

I use macromedia dreamweaver.

I am able to get the form to email me with what I call a answer list... you know

video=1
select=SkyRidge

etc...

That's fine but because the site is realy ment for older people they wil think it hasn't submitted and it will end up being that the email reciever will get lotts of emails.

Thus i want to get it to open a Thank You page when the viewer selects the submit button plus email me the information collected... No need for a DBase.

I tried what you mentioned with no success.