Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blocking Email Spam using JS

Status
Not open for further replies.

RenoWV

Technical User
Joined
Mar 16, 2002
Messages
156
Location
US
I have read that one way to foil the email harvesting bots from getting addresses off of a webpage is to embed the address into a javascript. Is this accurate? If so, could anyone offer a concise script that would accomplish that? Thanks...
 
Hi,

This is how you do it:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
user = &quot;john_doe&quot;;
site = &quot;site.com&quot;;

document.write('<a href=\&quot;mailto:' + user + '@' + site + '\&quot;>');
document.write(user + '@' + site + '</a>');
</SCRIPT>

You input your name in quotes beside user and the site URL in quotes besides site.

Hope this helps! NATE
spyderix.gif

design@spyderix-designz.com
 
Thanks very much SPYDERIX for a complete script! I just tested it and it works perfectly - I appreciate any and all help in ridding my life of the scourge of spam....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top