If you get a lot of e-mail spam, you might not be aware that email spammers frequently use e-mail "bots" that search online documents for typical email links. Information collected by these bots are usually shared or sold to fellow spammers.
There are a number of ways to prevent these e-mail bots from collecting data from your e-mail links. The easiest way is to "break-up" this data into smaller 'chunks' that will be ignored by the bots. This 'chunky' data is then re-assembled and displayed using (document.write) script code. Variations of this idea can be found on Google.
However I'd like to show you a unique way to use this information.
One of the problems I have is that I have a large number of different web sites and documents with contact email information. After spammers get hold of my current e-mail address and start to flood my server I usually need to change my e-mail address and start fresh. To be effective, I also want to block the old address. However changing all of my documents to the new e-mail address is difficult and time consuming.
var [color=blue]first[/color] = "myname";
var [color=blue]last[/color] = "myserver";
var [color=blue]tag[/color] = "com";
var [color=blue]mymail[/color] = ([color=blue]first[/color]+"@"+[color=blue]last[/color]+"."+[color=blue]tag[/color])[/font]
This code is saved to my web server as a file called "myEmail.js"
Next I add the following code (to access myEmail.js) in the "Header" section of all my documents.
Then I write the following code in the document where I want to display the e-mail link.
document.write("<a href=" + "mail"+ "to:"+ [color=blue]mymail[/color] + ">" + [color=blue]mymail[/color] + "</a>" );
NOTE to display a [color=green] regular text message[/color] the main code line could be;
document.write("<a href=" + "mail"+ "to:"+ [color=blue]mymail[/color] + ">" + "[color=green] email me [/color]" + "</a>" );
NOTE for an image you could use;
document.write("<a href=" + "mail"+ "to:"+ [color=blue]mymail[/color] + "><img src='Images/email.gif' width='70' height='20' border='0'></a>" );
Basically when each web page opens it automatically connects to the "myEmail.js" file and loads the variable "mymail". this variable is then used to construct a proper email link. The beauty of this system is that now I only need to change the email address information in one place. For example change the variable "[color=blue]first[/color]" from "myname" to "mynewname" in the (myEmail.js) file.
I hope you find this idea helpful...