Freepages-Help-L Archives

Archiver > Freepages-Help > 2003-06 > 1054948844


From: "Adrian Furniss" <>
Subject: Re: [FreeHelp] Belated Thanks and New Question
Date: Sat, 7 Jun 2003 02:22:19 +0100
References: <008a01c32c72$35b11f00$3e6efea9@jennifem>


Anke,
Thanks for the acknowledgement. Those buttons look gooooooood.

1. Email encoding.
I searched the web for advice and came up with a JavaScript approach.

*************************************
Save this to a file named "escript.js"
*************************************
//All code copyright Adrian Furniss, 2003.
//ajfurn_A_T_ntlworld.com
function e_mail(user,site,text){
var url = (!user || !site) ? null : user + '@' + site;
text = (!text) ? url : text;
var HTMLstr = (url!=null) ? '<a href=\"mailto:' + url + '\">' + text +
'</a>' : '&nbsp;';
document.write(HTMLstr);
}

*************************************
Put this within the <.head><./head> of every page, on which you want one or
more email links to appear
(Adjust relative path as necessary in accordance with site's file structure)
*************************************
<.SCRIPT language="JavaScript" src="escript.js"><./SCRIPT>

*************************************
Put this in the <.BODY><./BODY>, wherever you want a clickable email address
to appear. This can be embedded in a paragraph, in a table, anywhere that
would be ok for text to appear.
*************************************
<.SCRIPT >e_mail('name','domain.com','Clickable Text')< ./SCRIPT >

Adapt 'name', 'domain.com' and 'Clickable Text' as appropriate.

The resulting link will be written as :
<.a href="mailto:">Clickable Text<./a>
though you will not see this with View Source.

WARNING 1: If you don't specify the 'Clickable Text', then the full email
address (including @) will be used instead, but this will NOT be
harvest-resistant.

WARNING 2: This approach will not work for a small percentage of users who
run browsers without JavaScript (or with JavaScript disabled). I take a hard
nosed approach; namely that such users must be used to seeing incomplete and
broken web pages; they should get real, get JavaScript and stop being
paranoid! This is of course harsh on those who suffer involuntarily, but
when it comes to protecting my privacy I think I have a right to build my
pages how I want, and accept that there are compromises on the way.

Give it a try.


2. Relative URLs
Let's forget about going up and down in the folder hierarchy. For two files
(file_a.html and file_b.html) in the same folder, a hyperlink from the first
to the second would be:
<.A href="file_b">Go to File B<./A>

For example if you currently have the link with absolute url :
<A
href="http://freepages.genealogy.rootsweb.com/~mckemie/sitemap.html">;.......
</A>
try
<A href="sitemap.html">.......</A>
instead.
Note, no leading /
Once you have mastered this, going up and down through the folders is
childsplay.

Thanks again for the mention
Adrian

----- Original Message -----
From: "Jennifer McKemie" <>
To: <>
Sent: Friday, June 06, 2003 10:25 PM
Subject: [FreeHelp] Belated Thanks and New Question


> Hi Gang,
>
> I'm not sure if I ever came back here to share my success with the new way
of doing the buttons (that makes all the buttons look the same, but loads
only one image). My profuse thanks to Adrian and everyone else that helped
me get it right. If anyone wants to see...
>
> http://freepages.genealogy.rootsweb.com/~mckemie/index.html
>
> One observation--I have yet to be able to use the abbreviated links. The
ones where I don't have to include the entire URL. For whatever reason,
they haven't worked, and I've tried more than once. Even cutting and
pasting html from other much more experienced websters.
>
> New Question:
> Recently someone mentioned encoding email addresses to prevent them from
being harvested. Could someone elaborate on this? I have indeed noticed a
dramatic increase in junk mail since having the web page, but I feel that I
must have my email available for contact.....
>
> Thanks again to everyone for their spectacular and ever-generous support
to us newbies!
> Jen
>
> Jennifer McKemie
>
> http://freepages.genealogy.rootsweb.com/~mckemie
>
>
> ==== Freepages-Help Mailing List ====
> To Unsub from Digest Mode:
> send a new message with only the word UNSUBSCRIBE to
> mailto:
>
> ==============================
> To join Ancestry.com and access our 1.2 billion online genealogy records,
go to:
> http://www.ancestry.com/rd/redir.asp?targetid=571&sourceid=1237
>


This thread: