JoeP
11-12-2002, 01:34 AM
The code below is a nice little function to let a visitor send the link of my page to a friend. What I would appreciate is someone to show me a way I can modify the script so the message in the body would give alternate text instead of the page url address; in other words, instead of the Body message having: "location.href;" which is the actual URL i.e. http//www etc. I would like to have an alternate text link such as: "This Cool Page!" The recipient of the email would see and click on.
Any suggestions and/or advice will be appreciated.
Thank You!
<script language="javascript">
function mailpage()
{
mail_str = "mailto:?subject=" + document.title;
mail_str += "&body= I Thought You May Be Interested With This Page. It Is Located On This WebPage : " + document.title;
mail_str += ". Visit " + location.href;
location.href = mail_str;
}
</script>
<a href="javascript:mailpage()"><font face="Arial Narrow" size="2">Share This Page With A Friend.</font></a>
:thumbsup:
Any suggestions and/or advice will be appreciated.
Thank You!
<script language="javascript">
function mailpage()
{
mail_str = "mailto:?subject=" + document.title;
mail_str += "&body= I Thought You May Be Interested With This Page. It Is Located On This WebPage : " + document.title;
mail_str += ". Visit " + location.href;
location.href = mail_str;
}
</script>
<a href="javascript:mailpage()"><font face="Arial Narrow" size="2">Share This Page With A Friend.</font></a>
:thumbsup: