|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all! I use the following Javascript snippets to protect my email address.
<script language=javascript> <!-- var username = "email"; var hostname = "websiteaddress.co.uk"; var linktext = "Click here"; document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + linktext + "</a>") //--> </script How do you modify this so that when it's clicked on it generates the email but with text in the content or title part of the email?! I'm really stuck, so any help appreciated! Regards, Joel |
|
|||
|
Many thanks Sands!
I went to Kerala when I was 17 and rode an elephant! What a beautiful country. Regards, Joel |
|
|||
|
A small but further point. I noticed this in your code: "mail" + "to:"
Why not just "mailto:" instead..? I know this is hardly an error (since both versions will work), but if you have more code like that it could be worth optimizing... Another point, not so small: If you use javascript, then remember that it sometimes isn't available. That could happen simply by raising the security-level of the browser (IE). Or it could be caused by NoScript (Firefox). Or something else... My point is: Offer people an alternative text explaining that they see nothing because javascript is off. Otherwise they'll just see nothing, and won't even know that something was supposed to be present... The alternative text could also be an image, displaying the email address so people at least could read it and enter it manually. If javascript is on, this image would simply be covered and invisible. In any case: don't assume that javascript always is available... |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Email spam bots - display name vs. actual email address | apalmer123@msn.com | Web Programming Discussion Forum | 27 | 12-14-2009 10:25 AM |
| Email (not address, but email body) publishing | ADAM Web Design | Internet Industry | 1 | 08-23-2007 11:05 PM |
| Forged Email Headers and Email Load on Server | zephyrireland | Hosting Issues | 13 | 10-05-2006 07:28 PM |
| email marketing - email lists | gr | Marketing Strategies Discussion Forum | 4 | 03-15-2006 09:42 AM |
| Email interviewer required | Endomorph | Services for Sale/Hire | 0 | 02-22-2006 05:32 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2010 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |