October 24, 2002
Spam-Proofing Your Website - take 2

Ooh, a tweak to make the snippet more elegant. I just learned a new javascript tidbit - escape(variable). No more need for %20 instead of spaces!

<!-- email link -->
<script language=javascript>
<!--
var username = "davidfromblogdom";
var hostname = "blogdom.org";
var subject = "Hello from Blogdom";
var linktext = "Click Here To Send Me Email";
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + "?Subject=" + escape(subject) + ">" + linktext + "</a>")
//-->
</script>
<!-- email link -->

Digg It!  Digg It!   del.icio.us bookmark  Bookmark it!  

Posted by David at October 24, 2002 11:53 AM
Comments
Post a comment

Ability to add comments removed due to spam.

If you wish to add a comment, send an email to comments at blogdom dot org

replacing the at above with @ and the dot above with .