| 1:55 pm on Jan 26, 2006 (gmt 0)|
I believe there is no need to escape the double quote at the end of the first line: '\">');
| 2:37 pm on Jan 26, 2006 (gmt 0)|
I may be wrong but doesnt this achieve the same effect?
var username = "enquiries";
var hostname = "yoursite.co.uk";
var linktext = username + "@" + hostname;
document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + " title=" + linktext + ">" + linktext + "</a>");
| 3:36 pm on Jan 26, 2006 (gmt 0)|
When you say the script is not working, what is happening exactly? Is it not displaying at all or visible just not functioning?
| 8:55 pm on Jan 26, 2006 (gmt 0)|
Thanks. Removing the escape character did not seem to do anything. Havent tried the alternative script yet, but will do so later. The problem is that in Firefox nothing whatsoever is showing.
| 12:29 am on Jan 27, 2006 (gmt 0)|
It works fine in both IE and FireFox.
| 1:51 am on Jan 27, 2006 (gmt 0)|
| 5:55 pm on Jan 28, 2006 (gmt 0)|
Same here - I tested it with the code IN the document then with it external, works both ways. Put an alert in your JS to make sure it's correctly linked?
| 7:54 pm on Jan 29, 2006 (gmt 0)|
Anyway hope someone finds the script useful for themselves.
Not sure whether it is necessary to go so far as to display an image of the email address instead of text, but I do that anyway for ultimate bullet-proofing!
| 8:20 pm on Jan 29, 2006 (gmt 0)|
I was thinking, there is a reason that CAPTCHA images are really hard to read sometimes. And the only reason I can come up with is that there must be bots out there that use OCR (Optical Character Recognition).
So I guess if we want bullet-proof email addresses we have to write them down on a piece of cigarette paper and eat them.
| 8:51 pm on Feb 3, 2006 (gmt 0)|