spam
- Started
- Last post
- 9 Responses
- foreign
what's the best way to protect e-mail addresses in html documents from spiders?
is it enough to remove the active link? i've seen some people write it out, like mail.at.mail.com, or something like that.
what about stupid people browsing your site?
is this really the only thing you can do?
- version30
JAVASCRIPT
- foreign0
can you explain, or link me somewhere?
- welded0
Create a small function something like this:
function noSpam(user, domain, subject) {
locationstring = "mailto:" + user + "@" + domain + "?subject=" + subject;
window.location = locationstring;
}Then your link would look something like this:
[a href="javascript:noSpam('user', 'domain.name', 'subject');"]
Of course you can simplifiy it a bit by removing the subject variable, but this seems to work very well.
- welded0
Sorry, the function got a little messed up. The first pair of quotes should contain mailto:
- foreign0
thanks for the script, welded.
i should be able to figure it out...
- foreign0
crap code, propably, but this works:
function:
function noSpam(action, user, domain, subject) {
locationstring =action + "" + user + "@" + domain + "?subject=" + subject;
window.location = locationstring;
}...................
link:
a href="javascript:noSpam('mailto...
- foreign0
link should read:
a href="javascript:noSpam('mailto...
- foreign0
fuck it, action should be mailto