Forum Moderators: open
It is not essential that they operate as links, but I guess it is desirable.
I don't want to use form-mail since attachments may be required.
Any thoughts?
Kaled.
Or you can use some javascript:
<script type="text/javascript">
<!--
emailAddr='domain.com'
emailAddr=('johndoe' + '@' + emailAddr)
document.write('<A href="mailto:' + emailAddr + '">' + emailAddr + '</a>')
//-->
</script>
Change the user and domain names to your own of course.
But if the visitor has javascript turned off they won't be able to email you.
Jimmy
edit: looks like Frank beat me to the reply. And as you can see there are many variations on ways to do it with javascript.
I was thinking of something like
<table><tr><td>user</td><td>@</td><td>domain.com</td></tr></table>
However, I figure bots probably strip out basic tags so this wouldn't work. Nevertheless, something like this should be possible.
Perhaps, using <div style="display:none"> in the middle would work. Of course, then I have to remember to exclude robots from the page in case it attracts a site-wide hidden text penalty in the future.
Kaled.
If you only mask the specific person's name and the domain name, but still leave these two clues visible, you've left a flashing red light.
I like address masking for another reason - it acts like an include that allows me to manage email addresses from one central file and update the addresses for all pages on a website with just one edit.
Perhaps, using <div style="display:none"> in the middle would work. Of course, then I have to remember to exclude robots from the page in case it attracts a site-wide hidden text penalty in the future.
Two points about this:
You could add your email links to the page in a form something like this:
[email-at-example.com]
...and use javascript to write and obfuscate the <a ... > tag so that it's un-obfuscated when it is clicked.
This has the disadvantage (of course it was one that you specifically wanted to avoid...) of not being clickable when javascript is disabled, but has the advantage of still being readable.
I mainly like to use forms for contact purposes, but I include mailto links with them using a method something like this, just in case someone doesn't like my forms :)
-B