View Full Version : email this page to a friend script?
kovalik
08-09-2002, 09:01 PM
I have been looking for a script for a button that lets visitors "email this page to a friend". Does anyone know of a good, simple one?
Thanks very much,
kovalik:confused:
Try this:
<SCRIPT>
function Mailit(form) {
document.location.href=("mailto:" + form.address.value + "?subject=A web page to see&body=I found this web page at " + document.location.href + ", which I thought you might like to see.")
return false
}
</SCRIPT>
<FORM name="Recom" onsubmit="return Mailit(Recom)">
<TABLE>
<TR><TD>Recommend this Web page to a friend</TD></TR>
<TR><TD><INPUT type="text" name="address" size="35" value="Enter Email Address">
<INPUT type="button" name="Button" onclick="Mailit(this.form)" value="Send"></TD></TR>
</TABLE>
</FORM>
photaust
09-02-2002, 04:21 PM
I have also been seeking a "Mail this page to a friend" script.
However, I have been trying to alter it to include a preset email address in the "CC:" field so as a can be copied in with the email. (This way I will know who is referring my page.)
Unfortunately my attempts have been unsuccessful!
Can someone assist with the correct syntax that I should be using????
Cheers!
photaust
Try this, changing "yourname2@youraddress2" to suit
<SCRIPT>
function Mailit(form) {
document.location.href=("mailto:" + form.address.value + "?cc=yourname2@youraddress2&subject=A web page to see&body=I found this web page at " + document.location.href + ", which I thought you might like to see.")
return false
}
</SCRIPT>
<FORM name="Recom" onsubmit="return Mailit(Recom)">
<TABLE>
<TR><TD>Recommend this Web page to a friend</TD></TR>
<TR><TD><INPUT type="text" name="address" size="35" value="Enter Email Address">
<INPUT type="button" name="Button" onclick="Mailit(this.form)" value="Send"></TD></TR>
</TABLE>
</FORM>
For more on emails see:
www.huntingground.freeserve.co.uk/webplus/email.htm
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.