473,324 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Problems with my obscured-email javascript in Mozilla

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();retur n
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>

Jun 26 '06 #1
1 1549
tr***********@hotmail.com said the following on 6/26/2006 8:26 AM:
Hi,

apologies if this sort of query pops up all the time - I did spend a
while searching the archives first...
Did you find the many threads on the problems with mailto: ? Your link
doesn't work for me at all and not because of the script but because
mailto: doesn't work for me.
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.
Not for me it doesn't, it changes the href as you wanted.
I just put the script inline where I want a mailto href.
Use a form, server side processing, and all is fine, no need to try to
hide an email address.
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.
It works for me, what version Mozilla? And, what messages are in the JS
Console?
(The page in the <noscript> href just displays a message that you you
need to enable javascript.)


Search the archives for the problems with the noscript element.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Travis Spencer | last post by:
Hello, I am having some problem with a statically positioned element being obscured by one that is absolutely positioned. To see what I am working on, go to...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
2
by: Mike | last post by:
Hi, I am new to C and having problems with the following program. Basically I am trying to read some files, loading data structures into memory for latter searching. I am trying to use structres...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.