[thelist] Email address hiding question

David Bailey dab.hand at xtra.co.nz
Fri Jul 1 03:31:23 CDT 2005


Hi Matt,

Thanks again for your contribution which I've tested. You are right about
how it works in different browsers. I'm a greenie as far as that is
concerned, thinking that javascript works much the same in all browsers. IE
(Mac) works fine, but the replace() still doesn't work for the Body text.
Safari and Firefox (both Mac) only produce the "no-spam" address version.

Looks like this isn't such a good option. It has caused me to continue
looking at other scripts/options around the net.

Thanks again.

> From: Matt Warden <mwarden at gmail.com>
 
> You might want to change the function to this, but you might get
> unexpected results in some browsers (I don't have any idea, but it
> seems like you might):
> 
> function sendmail() {
> // cancel std event processing
> event.returnValue = false;
> // remove spam blocker
> var url = event.srcElement.href.replace(".no-spam at please.", "@");
> url = url.replace("Please remove spam blocker. ", "");
> // open email window
> window.location = url;
> }
> 
> As for your replace() failing, I don't know. Sorry.
> 
> -- 
> Matt Warden
> Miami University
> Oxford, OH, USA
> http://mattwarden.com
> 
> 
> This email proudly and graciously contributes to entropy.



More information about the thelist mailing list