|
Before discussing the FORM method, a quick and simple way is to visit
www.mways.co.uk/.
This web page, provided by Jolyon, codes an email address that you supply,
in to a format that will be parsed OK by most browsers. This might not
protect against determined spam-bots but should foil the simpler ones.
You enter the email address you want to use, take the converted string
it gives and put this in as your mailto link. For example if you enter
"user@domain" you get returned the string:-
<script language="JavaScript">document.write(';<a hr';+';ef="mai';+';lto';+';:';
+';%75%73%65%72%40%64%6f%6d%61%69%6e">use
r@domain</a>';);</script>
This does use Javascript. A drawback to Javascript methods is that some
people run with it turned off. If you do use Javascript it might be worth
putting a warning on the page that the mailto link relies on Javascript
being enabled. People who use tools like Proximitron to shut out adverts
and the like can just click the filter bypass on, refresh, send the mail,
and then click the bypass off again. It may also be helpful to include a
<NOSCRIPT> section:-
<NOSCRIPT> user (at) domain </NOSCRIPT>,
or use an image, so that those without Javascript can at least see the address.
If you want something that hides your address more effectifly, the use of
Javascript and FORMs can do it. The user types the name of a hidden page in
to the form and the javascript adds ".htm" to it and passes it back.
The action for the form is to pass control to the file name passed back from
the Javascript.
It is important with this technique that there is no link to the contact
page anywhere on your site or the crawlers will find it. You should likewise
not let any friends, who may know of the page, link to it. The technique also
relies on your web server not allowing access at the directory level.
You can see this in action and try it out below:-
To contact us please enter "contact" in the box in lower case
without the quotes and click on the [Go] button.
Note: If you enter the wrong word you will get
"Page not Found".
Use your Back-button to try again.
This is the HTML code used for this:-
<head>
<script Language=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!--
var mp;
function go()
{
//NB for browser compatibility, note element names are Case Sensitive.
mp=document.forms["gate"].elements["search"].value
document.forms["gate"].action=mp+'.htm'
return true
}
-->
</script>
</head>
<BODY>
<h5 align="center">
To contact us please enter "contact" in the box in lower case
without the quotes and click on the [Go] button.
</h5>
<form name="gate" onSubmit="go()" action="qqqqq.htm" >
<input type="password" name="search"><br>
<input type="submit" value="Go" id="submit1" name="submit1" >
</form>
<h5 align="center">
Note: If you enter the wrong word you will get
"Page not Found".<br>
Use your Back-button to try again.
</h5>
</BODY>
</html>
If you check out my contact page you will see that it is an extended
method to cater for multiple addresses using a drop down list.
|