Forum Moderators: open

Message Too Old, No Replies

javascripting email links

         

natty

11:44 am on Nov 5, 2004 (gmt 0)

10+ Year Member



hi all,

in an attempt to stop email havesters, i was thinking of javascripting all our links.
however, some people have js turned off, is there any way i can javascript the mailtos but still leave a link for non javascript people to use?

tia

nat

dcrombie

6:21 pm on Nov 5, 2004 (gmt 0)



Without JavaScript your only option is to present the email addresses as non-active links and use a graphic or obfuscation ("name AT example.com") instead of the real address.

kaled

7:16 pm on Nov 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The compromise that I've chosen is to display the address with a graphic and set each link target as simply "mailto:". I then set the full link target with javascript. That way, if javascript is turned off, the link will still work but the address will need to be entered by the user.

I use a little obfuscation in the javascript so that the whole email address is never contiguous.

With a little thought, you can arrange for your script to scan for all email links so that you don't have to update it every time you add an additional link.

Kaled.