/    Sign up×
Community /Pin to ProfileBookmark

Form confirmation e-mail problem

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:[email protected]
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>

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@GavinPearceSep 08.2003 — 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.

<i>
</i>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!--
function doit() {
document.moveme.submit();
document.location.href="http://www.internet.com";
}
--&gt;
&lt;/SCRIPT&gt;
&lt;FORM METHOD="POST" ACTION="mailto:[email protected]" NAME="moveme"&gt;
&lt;INPUT TYPE="text" NAME="email" VALUE="Please enter your e-mail."&gt;
&lt;INPUT TYPE="BUTTON" VALUE="Go" onClick="doit()"&gt;
&lt;/FORM&gt;
Copy linkTweet thisAlerts:
@buddybearauthorSep 09.2003 — 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.
Copy linkTweet thisAlerts:
@CyCoSep 09.2003 — set your file association for the .att extension to open with notepad....

it will be an ugly string, but it is decipherable...
Copy linkTweet thisAlerts:
@pyroSep 09.2003 — You'd really be better off doing this server side, as I doubt the script posted will work cross browser. Take a look at [URL=http://www.webdevfaqs.com/php.php#mailer]this[/URL], if your server supports PHP.
Copy linkTweet thisAlerts:
@GavinPearceSep 09.2003 — open the file in notepad or any text editor, it'll make sense.
Copy linkTweet thisAlerts:
@buddybearauthorSep 10.2003 — #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:[email protected]" 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.
Copy linkTweet thisAlerts:
@nguyenncSep 10.2003 — 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
Copy linkTweet thisAlerts:
@pyroSep 10.2003 — What else are you trying to get?
Copy linkTweet thisAlerts:
@biggsieSep 10.2003 — 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.
×

Success!

Help @buddybear spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...