The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Kenneth's pet project!


  • To: ukha_d@xxxxxxx
  • Subject: Re: [OT] Kenneth's pet project!
  • From: "garygfx" <garygfx@xxxxxxx>
  • Date: Thu, 19 Jun 2003 11:12:33 -0000
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

--- In ukha_d@xxxxxxx, "Jon Payne" <jgpayne@b...> wrote:
> I'd certainly be interested in this - at the moment I put an image
of my
> email address on the website but something more user friendly would
be good.

Here's the code. It's pretty simple but fools the bots because it
would need to interprit javascript and also the javascript is only
called if it can recognise the onclick event which browsers can and
bots can't. (Unless someone has taken the trouble to write a
javascript interpriter which is highly unlikely (don't speak too
soon!))

<SCRIPT language="JavaScript">
<!--
function mailme(user,domain,suffix){
document.location="mailto:"+user+"@"+domain+"."+suffix;
}
//-->
</SCRIPT>

Pop the above somewhere inbetween the HEAD tags, ideally after the
closing TITLE tag. Then create a link to any email address in your
BODY using this HTML:

<A href="javascript:;"
onclick="javascript:mailme('fred','hotmail','com')">Click here
to
email Fred</A>

You can use the onclick event as many times as you like on the same
page so long as that javascript function is in place at the top.
Break the address down into 3 parts: name @ domain @ suffix. Another
example:

<A href="javascript:;"
onclick="javascript:mailme('peter.smith','fatlarrys','co.uk')">Peter
Smith</A>

I could make it really clever and actually encrypt the address as
well using, for example A=Z, B=Y, C=X, (or better) but I have no
evidence that anything more than the above javascript routine is
necessary to throw bots totally off the scent.

Gary.




Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.