•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Site Layout and Usability section within the Web Development category of DaniWeb, a massive community of 427,794 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,727 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Site Layout and Usability advertiser: Programming Forums
Views: 1922 | Replies: 2
![]() |
The only way I can think of would be to munge the address. The problem with that is people can't click on it anymore and be able to mailto. A spam crawler can just as easily check your source as it can your page contents, so any email addresses would need to be specifically represented so only a human being with half a brain can transform them into something legit. dogtree@dogtreestudios.com would become dogtreeYOUKNOWWHATTOADDdogtreestudiosDOTNESScom.
I know this is an old thread, but I thought it was worth resurrecting for a solution.
The following script will disguise the e-mail link
[html]
<a href="mailto:name@server">name@server</a>
[/html]
as
[html]
<script type="text/javascript">emLink("eman, revres");</script>
[/html]
You simply reverse the order of the letters (name = eman, server = revres).
I hope that helps someone.
The following script will disguise the e-mail link
[html]
<a href="mailto:name@server">name@server</a>
[/html]
as
[html]
<script type="text/javascript">emLink("eman, revres");</script>
[/html]
You simply reverse the order of the letters (name = eman, server = revres).
function stringReverse(textString) {
if (!textString) return '';
var revString = '';
for (i = textString.length-1; i>=0; i--)
revString+=textString.charAt(i)
return revString;
}
function emLink(name, server) {
var rname = stringReverse(name);
var rserver = stringReverse(server);
var email = rname + "@" + rserver;
var mailText = '<a href="mailto:' + email + '">' + email + '</a>';
document.write(mailText);
}I hope that helps someone.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Site Layout and Usability Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
advertisment ajax browser cell email encryption eu eudora firefox gmail google home imap internet microsoft mobile mozilla news onecare open source opinion outlook penelope phishing phones professional research scam security site spam spammers spamming stocks technology thunderbird virus web webmail
- Res. Form/Dreamweaver 8/Email to Address (HTML and CSS)
- username=email address inputted on submission>is this possible (PHP)
- JavaScript -- Validating an email address (JavaScript / DHTML / AJAX)
- outlook 03 email address read as word; duplicate email (Windows Software)
- Protecting email address from robots (PHP)
Other Threads in the Site Layout and Usability Forum
- Previous Thread: DREAMWEAVER disaster..
- Next Thread: Is this possible? plz help


Linear Mode