SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Hi There,

    does anyone know of a script or code that will encrypt e-mail addresses so that when you hover over an e-mail link on a web site people can't tell what the e-mail address is in the display window at the bottom of browsers ?

    thanks!

  2. #2
    SitePoint Guru CJ's Avatar
    Join Date
    Apr 2000
    Location
    Mechelen, Belgium, Europe
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This won't encrypt the email address but users won't be able to see it in the address bar.

    <A href="mailto:youremail@domain.com" onmouseover="window.status='' ;return true"
    onmouseout="window.status='' ;return true">
    Email Us
    </a>

    You only need to change 'youremail@domain.com' to the email address you wish.

    Christophe

  3. #3
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool... i'll try that!

    thanks,

    jw

  4. #4
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    They's still be able to figure out what it is by viewing your code!

  5. #5
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's true. so then, do you or anyone else know how i can encrypt my email address in the code AND make it unreadable/invidsible in the browser window?

  6. #6
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you just want to protect against spam bots you can use Javascript to write the email address. I'm not very good at Javascript but you could...

    set a variable with the email address backwards
    reverse the string
    and write it to the page

    I'm sure that someone else can help you with the actual syntax.

    Hope this helps..

  7. #7
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could try something like this:

    Code:
    <script language="Javascript"> 
    <!-- 
    // Javascript by Plebius 
    // http://www.plebius.org/ 
    function mailto() 
    { 
     var domain = 'host.com'; 
     var username = 'username'; 
     document.location = 'mailto:' + username + '@' + domain; 
    } 
    //--> 
    </script>  
    
    
    
     <a href="javascript:mailto()">Click here to email</a>
    taken from http://www.plebius.org/article/000296


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
  •