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!
| SitePoint Sponsor |
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!




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
cool... i'll try that!
thanks,
jw
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?





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..
You could try something like this:
taken from http://www.plebius.org/article/000296Code:<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>
Bookmarks