Skip to main content

Email Link for Comments

Okay, I realized that my blog was missing something. A way to get in touch with me privately - by email. I realized this because I wanted to thank a person who made a nice comment on my site, but I had no easy way to say that privately, as she had no email link on her site. Then I realized, I don't have one on my site either!

And there is a good reason I didn't want to put my email on my website. Spam Spider Bots. I didn't want to get a lot of spam because my email address was on a web page.

I was thinking that I remembered seeing on a web site a javascript option to obscure an email. I did quick google, but all the javascript examples I saw were just creating the email as a standard link with the document.write() option. In other words, the result was a machine readable string, although a little harder for a spider to decode.

I decided I wanted a more complex method, that didn't actually make the email address until a user clicks on the link. That meant javascript with a function. I've tested it in IE (v6). I'm sorry if it doesn't work for other browsers.

My basic idea is to hide the email in a split up string:

// mailme @2004 Keith Horowitz - GNU Opensource Copyright/Copyleft
function mailme() {
t='MaAaIaLaTaOa:aTaEaSaTa'
t=t+'@aYaAaHaOaOa.aCaOaMa'
d=''
for (a = 0; a < t.length; a+=2 ) d=d+t.substr(a,1)
location.href=d
}

Look at the uppercase letters in the string above. Then the for loop strips out every other character into the new string d. Then the magical, location.href gets passed the valid mailto string. This causes the default email client to start a new email with the encoded email address.

The you need a link:

<a href=# onclick="mailme();return false">EMail Me</a>

Now this probably won't keep out all spam. But hopefully it should keep spiders from adding me to thier lists.

Comments

Popular posts from this blog

Nobody Blogrolling Me?

Accoriding to wholinkstome there are a bunch of links to me. I know only some people use blogrolling, and I've seen other people have me in their lists of linked blogs. I have 30+ people in my blogrolling list on the side ---> But wholinestome shows that nobody appears to be linking to here. Should I care? Should I remind others to blogroll me? (Feels like begging or nagging.) Should I delete the ones I blogroll who use blogroll and don't blogroll me? (Seems petty.) Should I assume something is wrong with wholinksme? (I've peaked at a couple sites, I'm not there, do I need to do a full inventory?) Should I assume something is wrong with blogroll for my site, and people just can't add me for some reason? (Could it be that simple?) Maybe it is because I haven't done '100 things' yet. :) What would you do? :)

Death in the Family

My father passed away on Sunday afternoon. He had Alzheimers for a number of years. I keep explaining to everyone who expects me to be devastated that I've already done a bunch of mourning. I know the service on Friday will be sad and emotional, but so far I haven't cried. I last saw him this past summer. I am sure he recognized me, but he was already showing that he didn't know who I was. So in my mind, I started to say goodbye then. When I went to my uncle's funeral a few months ago, and saw much cousins speaking about their father, I realized that I would be in that same spot in not too long. Sometimes with Alzheimers, the person's body stay much longer after their mind has gone. My dad was just at that point of slipping both complete beyond who he was and beyond the point of living comfortably. He was no longer happy. So it was a very good time for him to have his final rest. I was glad my sister was able to be with him to the end. His lung ...

I Voted, Colorado

Voting is different here in Colorado than it was back on the East Coast. In New Jersey, and I remember it was the same basic things when my parents voted in New York, the voting was in a mechanical voting booth. You would go to a desk and sign the big book. The would give you a sheet of paper. You would take the paper over to a voting machine. An assistant would take the paper and put it somewhere on the side of the machine. You would pull a big mechanical handle that would close the curtain behind you. Then you would flip the levers to indicate your vote. After, you would push the big handle, which would record your vote, reset the levers and open the curtain. Here in Colorado, the beginning of the process is the same. You wait on line and sign the big book. I went with my wife, as she dropped her car off for service. At first she was going to vote before she dropped off her car. But she called me to tell me the line was an hour long. After I picked her up at the shop,...