As I was working on a sub domain for my new site I decided to protect the email addresses on the site with a simple javascript to prevent harveters from grabbing them and flooding the mail box with spam.

Hadn't seen the script in the forum yet so I thought I'd share it.

Change the username and siteURL to yours and place this code where you want the link to show. Left as is no line decloration will appear under the link. If you want the link underlined then change "none" to: underline

CODE
<script language="JavaScript"><!--

username = "usernameHere";

siteURL = "siteURLHere";

document.write('<a href="mailto:' + username + '@' + siteURL + '"style="text-decoration: none;"> Contact Us</a>');

// End -->

</script>


pete 8)

Reply