Code Snippet: “Email a Link to this Page to a Friend”
Helping members share church website information with each other and their friends is not only a nice thing to do, it’s a form of evangelism. So, say you’re putting up a page about the children’s group, or upcoming church concert or picnic. Add this code snippet to the page so that your members can visit the page and EASILY email their friends a link back to the page to invite them to attend.
The following javascript code snippet can easily be copied into any of your web pages. It will create a button that says “Email a Link to this Page to a Friend.” When the button is clicked, it will open up the user’s default email program and place the link in the body of the email. All they need to do is supply the email address and send it.
Here’s the code:
<script language=”javascript”>function NavTo(url){ window.location = url }</script>
<INPUT class=”NavButton” onclick=”NavTo(’mailto:&subject=Take a look at this webpage&body=’+ ‘ ‘ + location.href)” type=”button” value=”Email a Link to this Page to a Friend”>
How-to:
Copy the code into the html source code of your web page. You can place it anywhere on the page between the <body> tags of your html.
Change the wording of the subject to personalize the subject line that will appear in the email. The snippet above is worded, “Take a look at this webpage” You can change it to anything you want. Do not delete the ‘=’ or ‘&’ signs before and after the text.
Change the wording of the “value” statement in the code to personalize the button. In the snippet above, the button reads, “Email a Link to this Page to a Friend.” Change only the text. Do not delete the quotation marks.
Save, upload and test your page.
Include this link on pages which your members might likely share with family and friends. These might include:
- Photo pages at your church site
- Worship times
- Maps to the church
- Information about special occasions
- The Pastor’s Blog
- Sermons online
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment