Jump to content
xisto Community
pbolduc

Email Address Protector Protect your email address fron harvesto

Recommended Posts

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 information in blue 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

 

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

username = "usernameHere";

siteURL = "siteURLHere";

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

// End -->

</script>

Share this post


Link to post
Share on other sites

I think he means encode each into a chr value rather than straight text.

<{POST_SNAPBACK}>


Perhaps this is what he was saying?

 

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

purpose = "mailto:";

username = "usernameHere";

siteURL = "siteURLHere";

linkName = "Contact Us";

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

// End -->

</script>

 

This script works the same and I guess it would be a little bit more secure

 

pete :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.