•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,767 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,172 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1350 | Replies: 6
![]() |
•
•
Join Date: Aug 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I am trying to protect email addresses on a web page from spammers. I found a javascript snippet from Syronex Anti Spam Solutions (http://www.syronex.com/antispam/) and it has worked well in the past. Since I have upgraded Firefox to the newest version I cannot access the email from my links. Is there a reason for this or is there another method I could used instead of javascript in firefox?
•
•
Join Date: Aug 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
When I place the cursor over the email link on the web page the following message appears in the bottom status bar "javascript:void(0)". Does this message mean that javascript is not working? I have it enabled in firefox.
The code I am using is below:
<script type='text/javascript'><!--
var v2="ZV4JECTJIXM3D8P";var v7=unescape("n%3FZ%2C*%03%3F/%275%2CAj%5B1");var v5=v2.length;var v1="";for(var v4=0;v4<v5;v4++){v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));}document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=Information%20Please'+'\'">'+'<b>Email us</b><\/a>');
//--></script><noscript><a href='http://w2.syronex.com/jmr/safemailto/#noscript'><b>email us</b> (using spam protection)</a></noscript>
Thanks for any assistance you can provide.
abhammer
The code I am using is below:
<script type='text/javascript'><!--
var v2="ZV4JECTJIXM3D8P";var v7=unescape("n%3FZ%2C*%03%3F/%275%2CAj%5B1");var v5=v2.length;var v1="";for(var v4=0;v4<v5;v4++){v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));}document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject=Information%20Please'+'\'">'+'<b>Email us</b><\/a>');
//--></script><noscript><a href='http://w2.syronex.com/jmr/safemailto/#noscript'><b>email us</b> (using spam protection)</a></noscript>
Thanks for any assistance you can provide.
abhammer
The above code runs fine in IE and Opera, so it has got something to do with Firefox. I guess the only thing you can do is to let those people know of this issue and see what turns up.
Also if you want to protect your email address, you can always keep an image instead of plain text. The users who need to get in touch with you would just mail at that address. Just an option...
Also if you want to protect your email address, you can always keep an image instead of plain text. The users who need to get in touch with you would just mail at that address. Just an option...
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Its not just about IE, Opera also works fine with the given snippet, thats almost 75% of the browser market.
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
It doesn't matter what percentage of the market works without semicolons or with embedded < and > symbols. The W3C standard requires the semicolons, and prohibits using the < and > symbols in embedded code.
All of this is listed on the W3C pages, with what to do to avoid the problems. They say to use the semicolons, and to place any code which contains < or > symbols in separate .js files.
When IE and Opera becomes more standards-compliant, the above code will cease to work.
Never rely on browser quirks.
Also realize that any user can turn his JavaScript off. Then the page will behave as though the JavaScript calls are not present.
All of this is listed on the W3C pages, with what to do to avoid the problems. They say to use the semicolons, and to place any code which contains < or > symbols in separate .js files.
When IE and Opera becomes more standards-compliant, the above code will cease to work.
Never rely on browser quirks.
Also realize that any user can turn his JavaScript off. Then the page will behave as though the JavaScript calls are not present.
Last edited by MidiMagic : Aug 25th, 2007 at 7:31 pm.
Daylight-saving time uses more gasoline
I thoroughly realize that, my previous post was just an observation...
"I don't accept change. I don't deserve to live."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
advertisment ajax asp browser cell developer development email encryption eu eudora firefox gmail google home html imap internet javascript microsoft mobile mozilla msdn news office onecare open source opinion outlook penelope phishing phones professional research scam security site software spam spammers spamming sql stocks technology thunderbird virus vista web webmail
- Simple JavavScript needs email validation (JavaScript / DHTML / AJAX)
- JavaScript -- Validating an email address (JavaScript / DHTML / AJAX)
- Windows 98 Second Edition SPYWARE PROGRAMS Free? (Viruses, Spyware and other Nasties)
- Searchportal.com (Viruses, Spyware and other Nasties)
- Protecting email address from robots (PHP)
- norton anti-virus (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: what is active X?
- Next Thread: IFrame help needed urgently! plz



Linear Mode