Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Using Javascript to shroud email address

    Hi!

    I'd like to add a clickable email address to the Contact Us page, but I don't want the address to get sniffed out by spambots.

    I found this and I'm considering using it:
    More advanced users may choose to shroud the email address with JavaScript and then insert the code into an HTML Snippet on the page. This approach is quite user-friendly as the email address still appears as a clickable link on the page and at the same time is safe-guarded from spam bots.
    To shroud your email, use the code below - replace [your_username] with the part of your e-mail address before "@" and [your_mail_account_domain] with the part after "@".

    <script language="JavaScript">
    var username = "[your_username]";
    var hostname = "[your_mail_account_domain]";
    var linktext = username + "@" + hostname ;
    document.write("<a href='" + "mail" + "to:" + username + "@" + hostname + "'>" + linktext + "</a>");
    </script>
    Looks pretty easy and straightforward... perhaps too easy?

    Before I commit, thought I'd find out what strategy you guys use. Do you risk putting your email address out there in a clickable fashion, what strategy to you use to avoid bots?

    Thanks!

  2. #2
    Join Date
    Apr 2010
    Posts
    900
    Plugin Contributions
    0

    Default Re: Using Javascript to shroud email address

    Also, if I post that into the define_contact page, will interfere with anything?

 

 

Similar Threads

  1. Replies: 2
    Last Post: 25 Nov 2014, 09:41 PM
  2. Replies: 4
    Last Post: 23 Jun 2011, 05:03 PM
  3. using "Email address exporter" to export ALL customers regardless of status
    By rosenblum68 in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 14 Jun 2010, 12:24 PM
  4. Replies: 0
    Last Post: 11 Jan 2010, 06:07 AM
  5. HELP! spammers are using my email address
    By deathsdoor in forum General Questions
    Replies: 5
    Last Post: 29 Jan 2008, 08:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg