T
trevors_decoy
Hi,
apologies if this sort of query pops up all the time - I did spend a
while searching the archives first...
My website tries to protect my email address from the spam harvesters
by obscuring it. Works like a dream under IE 5&6, fails under Mozilla.
I just put the script inline where I want a mailto href.
Under Mozilla the fake_email_address@fake_domain.com isn't replaced by
the real deal - both in the href and on the status bar. That suggests
my onclick/MouseOverare being ignored.
(The page in the <noscript> href just displays a message that you you
need to enable javascript.)
Any clues appreciated.
<script type="text/javascript">
<!--
function obfuscate_email()
{
email_start = unescape('%6D')+"ailto"+unescape('%3A')+"trev"
email_end = "oneensemble"+unescape('%2E')+"com";
email_middle = "or"+unescape('%40')+"cl";
return email_start + email_middle + email_end;
}
document.write('<a href="mailto:fake_email_address@fake_domain.com"')
document.write(' onclick="this.href=obfuscate_email();"')
document.write(' onMouseOver="window.status=obfuscate_email();return
true;"')
document.write(' onmouseout="window.status=\'\';return true;">')
document.write(' <img border="0" src="folder_bottom.gif" align="top"
width="32" height="20">')
document.write(' Contact us')
document.write('</a>')
//-->
</script>
<noscript>
<a href="cl_noscript.htm">
<img border="0" src="folder_bottom.gif" align="top" width="32"
height="20">
Contact
</a>
</noscript>
apologies if this sort of query pops up all the time - I did spend a
while searching the archives first...
My website tries to protect my email address from the spam harvesters
by obscuring it. Works like a dream under IE 5&6, fails under Mozilla.
I just put the script inline where I want a mailto href.
Under Mozilla the fake_email_address@fake_domain.com isn't replaced by
the real deal - both in the href and on the status bar. That suggests
my onclick/MouseOverare being ignored.
(The page in the <noscript> href just displays a message that you you
need to enable javascript.)
Any clues appreciated.
<script type="text/javascript">
<!--
function obfuscate_email()
{
email_start = unescape('%6D')+"ailto"+unescape('%3A')+"trev"
email_end = "oneensemble"+unescape('%2E')+"com";
email_middle = "or"+unescape('%40')+"cl";
return email_start + email_middle + email_end;
}
document.write('<a href="mailto:fake_email_address@fake_domain.com"')
document.write(' onclick="this.href=obfuscate_email();"')
document.write(' onMouseOver="window.status=obfuscate_email();return
true;"')
document.write(' onmouseout="window.status=\'\';return true;">')
document.write(' <img border="0" src="folder_bottom.gif" align="top"
width="32" height="20">')
document.write(' Contact us')
document.write('</a>')
//-->
</script>
<noscript>
<a href="cl_noscript.htm">
<img border="0" src="folder_bottom.gif" align="top" width="32"
height="20">
Contact
</a>
</noscript>