Jump to content

Recommended Posts

Posted

This is my most-used JavaScript code; I include it on all of my pages.

><script language="Javascript">
var ATSIGN = '@';
var PERIOD = '.';
var MT     = 'mailto:';
var CEXT   = 'com';
var NEXT   = 'net';
var OEXT   = 'org';
var AEXT   = 'aol';

function EM(ext, domn, urname, subj, linkText) {
  var addr;
  var sendingTo;
  addr = urname + ATSIGN + domn + PERIOD + ext;
  document.write(('<a href="' + MT + addr + '?subject=' + subj + '"\>' + linkText + '</a>')); 
}
</script>

 

To use the function I do:

>     <script language="Javascript">
  EM(CEXT, 'hotmail', 'username', 'From website.com (Which Page)', 'FirstName LastName'); 
     </script>

 

This creates a mailto: link with the person's full name as the anchor and the referring site and/or page as the subject of the message.

 

This is not, however, collected by email address harvesting spiders, since the HTML code does not contain an actual mailto link with an address.

 

--Beth

(Yours for a spam-free world)

Posted

Thanks, Beth.

 

For more info on that method, read here.

 

There have also been other methods of "hiding" an email link on a page. Some essentially converting the @ sign. But I would suspect as web spiders get more intelligent, that will be an easy one to break. read here.

 

kw

Posted

I do a couple of things similar to all the previously posted suggestions. Call me super paranoid B)

<script LANGUAGE="javascript">

var first = 'ma';

var second = 'il';

var third = 'to:';

var address = 'boxturt';

var domain = 'boxturt';

var ext = 'com';

var sub = '?';

var suba = 'subject=Comments';

document.write('<a href="');

document.write(first+second+third);

document.write(address);

document.write('@');

document.write(domain);

document.write('.');

document.write(ext);

document.write(sub);

document.write(suba);

document.write('">');

document.write('Email Us</a>');

</script>

This seems to work pretty well. Sometimes I just convert to ALL ascii, but I don't know how safe that is.....
boxturt@boxt

urt.com

translates to my email addy. There is a good text to ascii converter here:

dascii.exe

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...