View Full Version : E-mail Protection Scripts Problem

11-16-2007, 09:48 AM

I'm working on a Dreamweaver website. Need to protect my e-mail adresses from spam.

I've found several scripts:

<A onmouseover="email = new Array('i','n','f','o','@','h','a','n','d','e','l', 'g','a','t','e','.','c','o','m');this.href='mailto :';for(i=0;i<email.length;i++){this.href+=email[i]}" href="you@relays.osirusoft.com"><SCRIPT>text = new Array('i','n','f','o','@','h','a','n','d','e','l', 'g','a','t','e','.','c','o','m');for(i=0;i<text.le ngth;i++) {document.write(text[i])}</SCRIPT></A>


<script language="javascript"> function guard() {
var p1, p2, p3, p4, p5, p6;
p1 = '<a href="mai'
p2 = 'info'
p3 = '">'
p1 += 'lto:'
p2 += '@'
p5 = '</a>'
p6 = 'info@handelgate.com'
p2 += 'handelgate.com'
p4 = p6

But when I paste them between the body tags it never appears.

Should I move part of it to the head tags? How do I do that (if that is the problem)?

Ive been trying to solve this problem for quite a long, now i think its because im using dreamweaver...

Thank you

11-16-2007, 01:35 PM
there are a couple of ways.

Add text at the end of the email and tell user to delete
replace the @ and/or . character(s)
email (a) address (dot) com
Use server side language
provides full security of email
allows greater flexibility in the email sent
only downside is you need php installed and accessible

11-16-2007, 04:24 PM
The server side (PHP, asp, mailform, third party utils, etc.) is always better for mail stuff because it allows folks without email clients to use it.

That said, here's an encryptor for folks without PHP or other server side mail facilities: