|
Posted by Sefani on 03/04/07 23:15
re - hiding email from spam robots
there's a lot of good javascript snippets on the web that dis-assemble and
re-assemble email addresses with DOCUMENT.WRITE statements. Some are more
convoluted than others.
I've used one basic one for years - with excellent results.
Here's the code:
=======================
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var user;
var domain;
var suffix;
var subject;
function ivisimail(user, domain, suffix, subject)
{
document.write('<a href="' + 'mailto:' + user + '@' + domain +
'.' + suffix + subject + '" class="your_link_class">' + user + '@' + domain
+ '.' + suffix + '</a>');
}
// End -->
</script>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
invisimail("myname", "mydomain", "com",
"?subject=Type%20Your%20Subject%20Here")
// End -->
</script>
==============================================
you can change the name "invisimail" to suit yourself; don't start it with a
number, keep it simple; change the name like wise in the <body> script.
Navigation:
[Reply to this message]
|