theflyingminst
02-12-2008, 11:25 AM
Hi I am using a JavaScript code that works with an .asp file (view asp code here: http://www.brainjar.com/common/viewsource.asp?source=/asp/formmail/formmail.asp).
JavaScript code:
<html>
<head>
<script type="text/javascript">
//<![CDATA[
function processForm(f) {
f._recipients.value = f.Email.value; f._recipients2.value;
}
//]]>
</script>
</head>
<form action="formmail.asp" method="post">
<input name="_recipients" type="hidden" value="" />
<input name="_recipients2" type="hidden" value="myemail@myemail.com" />
<input name="_replyToField" type="hidden" value="Email" />
<input name="_requiredFields" type="hidden" value="Name,Email" />
<input name="_fieldOrder" type="hidden" value="info1,info2" />
<input name="_subject" type="hidden" value="Your confirmation Email.." />
<input type="hidden" name="info1" value="Info...">
<input type="hidden" name="info2" value="Info 2...">
<input name="_redirect" type="hidden" value="post-enter.htm" />
<input name="Name" type="text" size="28" />
<input name="Email" type="text" size="28" />
<input class="button" type="submit" value="Submit" onclick="return processForm(this.form)" />
<input class="button" type="reset" value="Clear" /></th>
</body>
</html>
The .asp code is set up to send an email and the JavaScript sends it to the address inputted in the email field (The form has hidden data that they will use for access purposes on my website).
My problem is calling a multiple function so that it will ALSO send the email to myself (myemail@myemail.com) for security purposes.
The function works fine like this:
function processForm(f) {
f._recipients.value = f.Email.value;
}
I tried doing something like this:
function processForm(f) {
f._recipients.value = f.Email.value; f._recipients2.value;
}
and that doesn’t cut it, I’m assuming it’s probably a syntax issue?..
Any help would be greatly appreciated.
Thanks!
JavaScript code:
<html>
<head>
<script type="text/javascript">
//<![CDATA[
function processForm(f) {
f._recipients.value = f.Email.value; f._recipients2.value;
}
//]]>
</script>
</head>
<form action="formmail.asp" method="post">
<input name="_recipients" type="hidden" value="" />
<input name="_recipients2" type="hidden" value="myemail@myemail.com" />
<input name="_replyToField" type="hidden" value="Email" />
<input name="_requiredFields" type="hidden" value="Name,Email" />
<input name="_fieldOrder" type="hidden" value="info1,info2" />
<input name="_subject" type="hidden" value="Your confirmation Email.." />
<input type="hidden" name="info1" value="Info...">
<input type="hidden" name="info2" value="Info 2...">
<input name="_redirect" type="hidden" value="post-enter.htm" />
<input name="Name" type="text" size="28" />
<input name="Email" type="text" size="28" />
<input class="button" type="submit" value="Submit" onclick="return processForm(this.form)" />
<input class="button" type="reset" value="Clear" /></th>
</body>
</html>
The .asp code is set up to send an email and the JavaScript sends it to the address inputted in the email field (The form has hidden data that they will use for access purposes on my website).
My problem is calling a multiple function so that it will ALSO send the email to myself (myemail@myemail.com) for security purposes.
The function works fine like this:
function processForm(f) {
f._recipients.value = f.Email.value;
}
I tried doing something like this:
function processForm(f) {
f._recipients.value = f.Email.value; f._recipients2.value;
}
and that doesn’t cut it, I’m assuming it’s probably a syntax issue?..
Any help would be greatly appreciated.
Thanks!