SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    How to Hide Email Address from bots but display it.

    I suck at JavaScript. This is probably really simple. Please take pity on me an help?

    I'm trying to display my email address and have it linked (with mailto on a website. However, I don't want to just do that with HTML b/c of spam bots. Isn't there a JavaScript way to do this?

    Thanks,
    ~TehYoyo

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,621
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    There's a ton of stuff on this online. Sounds like you didn't do any googling first.

    Try this:

    http://www.websitecodetutorials.com/...n-tutorial.php

  3. #3
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ralph.m View Post
    There's a ton of stuff on this online. Sounds like you didn't do any googling first.

    Try this:

    http://www.websitecodetutorials.com/...n-tutorial.php
    Hey! I did a little bit of Googling...

    Thanks for the help. I'll try the first method.

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,358
    Mentioned
    179 Post(s)
    Tagged
    9 Thread(s)
    Hi,

    I would recommend the SpamSpan technique (at paranoia level 3).
    It has the major advantage of leaving easy-to-read text when JavaScript is disabled.

    Example:

    HTML Code:
    <span class="spamspan">
    <span class="u">user</span>
    [at]
    <span class="d">example [dot] com</span>
    </span>
    Result (JavaScript enabled)

    HTML Code:
    user@example.com
    Result (JavaScript disabled)

    HTML Code:
    user [at] example [dot] com
    See also:
    http://stackoverflow.com/questions/4...web-these-days
    http://www.zdnet.com/blog/seo/usabil...l-address/1299


Bookmarks

Posting Permissions

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