PDA

View Full Version : no spam please


cty2
08-Jul-2003, 08:48 PM
I've searched for "spam" - didn't find anything, so here's my question.
What's the best way to change the email address under "contact us " button, so that it doesn't put the proper address in for the spammers to reap? I'd like to replace it with a bit of javascript code that's more difficult to parse, or put in a link to our "mail-us.htm" page.
Currently I've put in a "sales@------company.co.uk------" in the mail address. Not sure how many punters will know what to do with this.

In our "info" page, customers clicking on the email link get taken to a web page that sends a mail to us. Or is there a better way?

Many thanks

Charles

pinbrook
08-Jul-2003, 10:38 PM
<script type=text/javascript>
var _u = "sales";
var _d = "domain.co.uk";
var _l = _u + "@" + _d;
var _m = "click to email us";
document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
</script>

here's a nifty js script I have used in the past. I prefer to re-direct everyone to an online enquiry form though, it is more secure (as long as the email address is in the cgi script and not in the html)

cty2
09-Jul-2003, 09:52 PM
Thanks Jo,

I'll hang on to that script - nice one.

I already have an html form that I direct users to from elsewhere on the site, but I can't see how to replace the normal email address that you have to enter in View|Business Settings|Company Contact. It won't let you NOT enter an email address. That's the mail address under the "contact us" button.

Maybe one of the .pl script templates could be edited to add in your script?

regards

Charles

cdicken
10-Jul-2003, 08:12 AM
Thanks Charles

That's a good suggestion. I have requested this a number of times myself, and I shall add your voice to the chorus.

It is worth checking with your webhost whether they supply a mailform.pl type script. Often they provide instructions on how to use it. You can then follow their instructions to create the HTML for a form and then embed with with !!< >>!! tags within the text field of a brochure fragment. I've done this once before and it worked pretty well.

tdw
09-May-2005, 08:36 AM
Thanks for the script, I have been searching for it all morning - I know I found it in this forum.

NormanRouxel
09-May-2005, 09:56 AM
I thought up this one as it might keep the robots at bay a year or two longer as there's no mailto: generated.

Code for Act_Primary.html (just above the </HEAD> tag)<script language=JavaScript>
<!-- email address obfuscator
function linkto(name, address1, address2){
location.href = 'mai' + 'lto:' + name + String.fromCharCode(60 + 4) + address1 + address2;
}
//-->
</script>And this goes where you want the e-mail link.<a href="javascript:linkto('info','mysite','.com')">Mail Me</a>and would mail info@mysite.com

tdw
09-May-2005, 10:12 AM
Thanks for that.

webyourbusiness
10-May-2005, 03:14 PM
Nice variation on the string.fromcharchode Norman - I'm going to put that into my super-paranoia mailto obfusticator version... the splitter that I published in the previous thread concerning this topic... I'll post a link to the code when I finish the next variant in a few minutes...

regards

Greg

Bob Isaac
10-May-2005, 03:24 PM
Take a look at this one:

http://w2.syronex.com/jmr/safemailto/

I now use this instead of the other variations of javascript.

webyourbusiness
10-May-2005, 03:43 PM
http://www.webyourbusiness.com/freebies/super-paranoia-email-obfusticator.shtml

I haven't cleaned up the HTML - so no comments on the HTML errors on the page JUST yet please!