"Email A Page To A Friend" Javascript

Insert the following Java Script into the head of your web page document to let your visitors send one of your web page to a friend via email:

<script language="javascript">
function mailpage()
{
mail_str = "mailto:?subject=
Check out the " + document.title;
mail_str += "&body=I thought you might be interested in the
" + document.title;
mail_str += ". You can view it at, " + location.href;
location.href = mail_str;
}
</script>

You can modify the parts in BURGUNDY.

Put this code as your link::

javascript:mailpage()

Click here to email this page to a friend.

When the link is clicked on, the users email will pop this up:

Email a Page to a Friend Script

Troubleshooting:

If the code above doesn't work on your server modify the following line:

mail_str += ". You can view it at, " + location.href;

with this:

mail_str += ". You can view it at, " + location.href.toString();

View more free JavaScripts

 

Webmaster Resouces
Just Getting Started
Finishing Touches
Website Promotion

» Design Your Own Web Site Overview
» Webmaster How To's
»
HTML Tutorial
» Barebones Guide to HTML
Webmaster Forums
»
Web Design Tutorials
» Web Templates
» Blog Templates
» Premium Website Templates
» Domain Name Registration
»
Web Hosting
»
Ecommerce - Accept Credit Cards
»
Stock Photography
» Web Design Articles
» Web Design Books
» Computer Virus Information
» CGI Perl Javascript Scripts
» Free Javascripts
» Font Resources

» Flash Photo Galleries
» Flash Music Players
» Flash Calendars
»
Website Scripts
»
Affiliate Programs

» Website Promotion
» Web Designer Directory
»
No Spam Site Promotion
»
Web Resources Directory
»
Advertise on Hoover Web Templates
»
Web Design Link Partners
» Web Templates Link Partners

Website Builders
Web Directories
Free Stuff

» Free Flash Site Builder
» Website Builder Reviews
»
Web Page Builder
»
Free Home Page Maker
» Free WAP Page Maker
» Webmajestic's Free Web Page Builder

» Web Designer Directory

» Free Web Templates
» Free Web Graphics
»
Free Sounds Wavs
» Free Fonts Archive
» Free Business and Legal Forms
»
Free Ebooks
» Free Software
» Free Flash Animations
» Free Button Maker

© 2000-2013 Hoover Web Design. All Rights Reserved.
No part of this website may be downloaded, copied or reproduced without the written permission of Hoover Professional Web Design.