dw-murphy at cox.net
dw-murphy at cox.net
Sat Jun 26 16:16:29 CDT 2004
Bob, Good suggestion. The other for folks with javascript disabled, as MS has recommended for their latest security breach, put you e-mail address in an image on the page so folks can at least get the address. Doug > > From: "Bob Gajewski" <rbgajewski at adelphia.net> > Date: 2004/06/26 Sat PM 02:12:15 EDT > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Subject: [AccessD] OT: Stopping spammers on your website using JavaScript > > NO ARCHIVE > > For those of you that have websites, and have emails addresses in your > source code ... > > There are many email address 'harvesters' out there that simply troll your > HTML source code looking for valid email addresses (name at domain.com). They > then sell lists of these addresses to anyone willing to buy them - usually > spammers. > > Although this solution is not new by any means, I have finally got it up and > working on my sites - and it works great! This will prevent 99% of these > harvesters from ever finding your actual email addresses, yet lets users > link seamlessly. > > WATCH FOR LINE WRAP > > Step 1 - Create an external JavaScript file ("tools.js" or whatever you want > to name it). Put it in your web host root directory. > > function sendMail(n2,d2,e2,s2,b2){ > var r2 = 'mailto:' + n2 + '@' + d2 + '.' + e2 + '?subject=' + s2 + > '&body=' + b2; > document.location.href = r2; > } > > Step 2 - Add a call to the external file in each of your web pages. Place > this AFTER the </head> tag and BEFORE the <body> tag. > > <script language="JavaScript" src="tools.js"></script> > > NOTE: If any of your pages are in subfolders, you will have to alter the > 'src' tag accordingly. For example, let's say you have a web page > "download.html" in your "download" subfolder. Modify your tag as follows: > > <script language="JavaScript" src="../tools.js"></script> > > The "../" tells your subpage to look in your main folder for the external > JavaScript file. > > Step 3 - Modify your email hyperlinks as follows: > > FROM EXAMPLE: > > <a href="mailto:name at domain.com?subject='Feedback'&body='Input your > comments here'">Feedback</a> > > TO EXAMPLE: > > <a href="javscript:sendMail('name','domain','com','Feedback','Input your > comments here');">Feedback</a> > > Of course, the Subject and Body fields are optional. If you want to omit > either of them, simply use '' in the code. You must ALWAYS pass the full > five parameters, even if they are blank. > > NO SUBJECT EXAMPLE: > > <a href="javscript:sendMail('name','domain','com','','Input your comments > here');">Feedback</a> > > NO BODY EXAMPLE: > > <a > href="javscript:sendMail('name','domain','com','Feedback','');">Feedback</a> > > NO SUBJECT OR BODY EXAMPLE: > > <a href="javscript:sendMail('name','domain','com','','');">Feedback</a> > > > I hope that this helps any of you eliminate getting spammed from your web > page email links. > > Regards, > Bob Gajewski > > > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >