/    Sign up×
Community /Pin to ProfileBookmark

spambot countermeasure help

I’m trying and failing to use the spambot countermeasure in the way I want.

I can use it ok to put an email address which will appear on the page as “[email protected]” That works fine.

What I want is for the link on the page to appear as “Email Andy”.

I’ve tried to embed the script in the <a> tag but it’s not playing ball.

Any suggestions?

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@AdamBrillMar 20.2003 — Is this what you want?

<a href="mailto:[email protected]">Email Andy</a>
Copy linkTweet thisAlerts:
@twonamesauthorMar 20.2003 — YES! but I want to replace the "[email protected]" with the javascript which hides the address from spambots.

You can guess what's prompting me to try to do it I bet!
Copy linkTweet thisAlerts:
@AdamBrillMar 20.2003 — Well, you could try this. Put this in the head:

function email(){

document.location="mailto:[email protected]";

}

And the link would be like this:

<a href="#" onclick="email(); return false;">E-mail Andy</a>

I'm not sure if that would help or not, but it would be worth a try. I've never heard of that being a problem... Is it really that much of a problem for you??
Copy linkTweet thisAlerts:
@twonamesauthorMar 20.2003 — Just thinking is a problem ath the mo!

Maybe I'm not being clear in what I'm trying to do or maybe your answer is exactly what I need but I'm too much of a javascript virgin to spot it.

I got this script...

<script language="JavaScript"><!--

// hide script

var sb_domain = "aol.com"

var sb_user = "joe8625"

var sb_recipient = sb_user + "@" + sb_domain

var sb_url = "mailto:" + sb_recipient

document.write(sb_recipient.link(sb_url));

// --></script>

and this puts an email link on the web page which appears as "[email protected]"

I want to do something a little different. I want "Email Andy" to appear on the page and the underlying link to be "mailto:[email protected]" (yes, I'm a morris dancer. Don't judge me too harshly)

The point of using the script is to stop the email addresses from being harvested.

Am I making sense yet?

Thanks
Copy linkTweet thisAlerts:
@AdamBrillMar 20.2003 — Change the function form what I had to this:

function email(){

document.location="mailto:squire@"+"westminstermorris.org";

}

I can't really check, but I think that would take care of most of your problems. The "+" in there should make it so the programs won't find it...
Copy linkTweet thisAlerts:
@twonamesauthorMar 20.2003 — HANG ON - Spotted it!

Explaining the problem to "She who would like to be obeyed" I could see what I needed.

Looking at the sample script, I set

sb_url to be "Mailto:" + sb_user + "@" + sb_domain

sb_recipient to be "Mail Andy" rather than sb_user + "@" + sb_url

I think it'll work.

If only I'd looked a little deeper.

Thanks for the help though.
×

Success!

Help @twonames spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...