Forum Moderators: mack
A method I have found to be very effective is to assign a class to any email address links that I want to use. Then in the anchor <a> element assign a link to your contact form but if the user has JavaScript enabled you can use your own "rebuild the email address using javascipt secret formula" option to alter the "href" attribute ;)
It doesn't have to be anything too terribly fancy, just enough to make it difficult for harvesters to grab.
<script language="javascript">
function hiveware_enkoder(){var i,j,x,y,x=
"x=\"z?$^$^^^^^^^$?z*z427^^^^^^^^^$^^?z?^^?rz8Y3758)z?^$ge)6-58^^^^^^^^^^88" +
"^^^^^^'^^^^^^848^^^^g^^d5w47ef78fh8z9^^^^^$^^uh068568.728*ft847u944e764=6+" +
"lvg49!48e9796;9+?9e;0k94c9xgg9^^^^^^^^9{g5=4^^^^^$^^+4+729*6t9c7j9z6*8n8C4" +
"u40538=6uhd5wez4?:z5q4h4=5vg{4=3+:tev8)4?d=8i3*8t8z7>5k4?5k;*9vd+8)22^^^^^" +
"^^^^^^^^^^^^^^^^^^^j^^20f=^^^^^$u5p8g5n?}4d8wfk8?4-){e6{?=-7+84;.*k3vquh=k" +
"0)zt*8t6*c00z==>4k?8k2q9he!?ki=pj=tng9n8-5khv7igp=v4uz>506z4?k-7+j6v?-=8+9" +
"{9}7t+{?!-u{.}k9*^$^^8d2w?ugd9w^^^^8?3t2vu4fup0w{=2*vCt:*ncxg?l+cle*8z*tvu" +
"d=e=++{=+30wu0z?z4?-kcje0z>k=2?h=))?gntvuk*tq}++3.k*wu0z?-{+4=jvipn0z>k=}q" +
"h!=ipg*d3?k*t{!=+3.kdwu0z?-?-k=jvu^$^^={?))?{=+l*tvudwu0{vj=k-tv>z0ngpit*k" +
"?2=k*z0n=hqcvj0okphqt*l?O}{-?;+}/l@?k=+.k-;+=/{=gpivjv*l+=!z0ejctC))?{=^$" +
"?k*tqh=n0z>k=2k=jvipgh}+44?-cO?l*tq*pko0jvvipgn0z+44-k.jk?@l//=z?-{}+=vCt" +
"cje0{!=+l*=$={?))=hqt*k?2=k>z0ngpivj=k-?9+}hqt*l?Ocvj0okp*z0ngpivj.k-9+=/" +
"/l@?k=+}{-?z0ejctCv*l+=!{=\";y='';x=unescape(x);for(i=0;i<x.length;i++){j" +
"=x.charCodeAt(i)-2;if(j<32)j+=94;y+=String.fromCharCode(j)}y";
while(x=eval(x));}hiveware_enkoder();
</script>
to encode a mailto: link like this, try this tool [automaticlabs.com]
Unfortunately sometimes you just gotta share your email, in fact it's my opinion that a website with only a contact form and no contact info is usually shady in nature.
[edited by: mack at 1:28 am (utc) on Jan. 10, 2006]
[edit reason] URL removed [/edit]