T
TPK
I have a form that collects field data, validates the data and sends
it (on submit) to a specific email address and to a text file. This is
done through a CGI form mail program. The form works well for this,
but I’d like to add some functionality using JavaScript.
The functionality I’d like to have is:
When the form submits, and email is sent to the specific email, I’d
also like the same email sent to the person submitting the form.
One of the fields on the form contains the email address of the person
filling out the form(senderEmail).
I’d like to have the value of that field (the sender’s email address)
incorporated in the onClick event so that when the user/sender clicks
the submit button the action that takes place sends e-mail to:
1) the “recipient”
2) the text file
3) the “sender”
Here is a shortened version of the form:
<form action="/cgi-bin/formmail.pl" name="MyForm" method="POST">
<input type="hidden" name="recipient" value="(e-mail address removed)">
<input type="Text" name="senderName">
<input type="text" name="senderEmaill" >
<input type="submit" value="submit" onClick="onClick();return true;">
<input type="reset" value="reset" name="reset">
</form>
Can someone show me a Javascript I can use (and how to use it in the
form) that would accomplish this?
Thank You,
TPK
it (on submit) to a specific email address and to a text file. This is
done through a CGI form mail program. The form works well for this,
but I’d like to add some functionality using JavaScript.
The functionality I’d like to have is:
When the form submits, and email is sent to the specific email, I’d
also like the same email sent to the person submitting the form.
One of the fields on the form contains the email address of the person
filling out the form(senderEmail).
I’d like to have the value of that field (the sender’s email address)
incorporated in the onClick event so that when the user/sender clicks
the submit button the action that takes place sends e-mail to:
1) the “recipient”
2) the text file
3) the “sender”
Here is a shortened version of the form:
<form action="/cgi-bin/formmail.pl" name="MyForm" method="POST">
<input type="hidden" name="recipient" value="(e-mail address removed)">
<input type="Text" name="senderName">
<input type="text" name="senderEmaill" >
<input type="submit" value="submit" onClick="onClick();return true;">
<input type="reset" value="reset" name="reset">
</form>
Can someone show me a Javascript I can use (and how to use it in the
form) that would accomplish this?
Thank You,
TPK