Add to favourites code

Lee Baker Manila-Newbies@userland.com
Mon, 15 Dec 2003 07:36:42 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C3C2DE.2F4A42B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have some code (Javascript) for an "Add to Favourites" link which I =
wish to add to my Manila site at =
http://astonvilla.blogfootball.com/lions/ but it refuses to work! Could =
some one please advise me? The curly brackets in the original code get =
converted to &#123 and &#125 plus I get an 'error on page'.

Code:


<!--This is one of many scripts which are available at: *---
//--http://www.JavaScript.nu?javascript *---
//--This script is FREE, but you MUST let these lines *---
//--remain if you steal this script. *---
function bookmark(url, description)
&#123;
//***---This text will be shown to the visitor if it has Netscape.
netscape=3D"First push OK and then hit CTRL+D to add a bookmark to this =
site."

if (navigator.appName=3D=3D'Microsoft Internet Explorer')
&#123;
window.external.AddFavorite(url, description);
&#125;
else if (navigator.appName=3D=3D'Netscape')
&#123;
alert(netscape);
&#125;
&#125;
//-->

</SCRIPT>
=20

<B><A =
HREF=3D"javascript:bookmark('http://astonvilla.blogfootball.com/lions/','=
Lions Blog');">Add Lions Blog to Your Favourites (STILL NOT =
WORKING....DO NOT CLICK!)</A></B>



I also have this code which will not even show up!! (Again, the curly =
brackets get changed to &#123 and &#125 in the template):

<!-- ADD TO BOOKMARKS FAVOURITES -->
<font STYLE=3D"font-family:VERDANA; font-size:8PT;">
<script language=3D"JavaScript">
var message =3D "Add to favourites";
var url =3D "HTTP://astonvilla.blogfootball.com/Lions/";
var title =3D "Lions Blog";
if (document.all) {
document.write("<a href=3D\"javascript:window.external.AddFavorite(url, =
title)\">" + message +"</a>");
} else {
document.write("Lions Blog");
if (document.layers) {
document.write(" (Press CTRL+D)");
}
}
</script>

<!-- END BOOKMARKS SCRIPT -->


PLEASE help. It's driving me nuts!!

Cheers
Lee



------=_NextPart_000_000F_01C3C2DE.2F4A42B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>I have some code (Javascript) for an =
"Add to=20
Favourites" link which I wish to add to my Manila site at <A=20
href=3D"http://astonvilla.blogfootball.com/lions/">http://astonvilla.blog=
football.com/lions/</A>=20
but it refuses to work! Could some one please advise me? The curly =
brackets in=20
the original code get converted to &amp;#123 and &amp;#125 plus I get an =
'error=20
on page'.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;!--This is one of many scripts =
which are=20
available at: *---<BR>//--http://www.JavaScript.nu?javascript =
*---<BR>//--This=20
script is FREE, but you MUST let these lines *---<BR>//--remain if you =
steal=20
this script. *---<BR>function bookmark(url,=20
description)<BR>&amp;#123;<BR>//***---This text will be shown to the =
visitor if=20
it has Netscape.<BR>netscape=3D"First push OK and then hit CTRL+D to add =
a=20
bookmark to this site."</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>if (navigator.appName=3D=3D'Microsoft =
Internet=20
Explorer')<BR>&amp;#123;<BR>window.external.AddFavorite(url,=20
description);<BR>&amp;#125;<BR>else if=20
(navigator.appName=3D=3D'Netscape')<BR>&amp;#123;<BR>alert(netscape);<BR>=
&amp;#125;<BR>&amp;#125;<BR>//--&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;/SCRIPT&gt;<BR>&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;B&gt;&lt;A=20
HREF=3D"javascript:bookmark('http://astonvilla.blogfootball.com/lions/','=
Lions=20
Blog');"&gt;Add Lions Blog to Your Favourites (STILL NOT WORKING....DO =
NOT=20
CLICK!)&lt;/A&gt;&lt;/B&gt;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I also have this code which will not =
even show up!!=20
(Again, the curly brackets get changed to &amp;#123 and &amp;#125 in the =

template):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;!-- ADD TO BOOKMARKS FAVOURITES=20
--&gt;<BR>&lt;font STYLE=3D"font-family:VERDANA; =
font-size:8PT;"&gt;<BR>&lt;script=20
language=3D"JavaScript"&gt;<BR>var message =3D "Add to =
favourites";<BR>var url =3D "<A=20
href=3D"http://astonvilla.blogfootball.com/Lions/">HTTP://astonvilla.blog=
football.com/Lions/</A>";<BR>var=20
title =3D "Lions Blog";<BR>if (document.all) {<BR>document.write("&lt;a=20
href=3D\"javascript:window.external.AddFavorite(url, title)\"&gt;" + =
message=20
+"&lt;/a&gt;");<BR>} else {<BR>document.write("Lions Blog");<BR>if=20
(document.layers) {<BR>document.write(" (Press=20
CTRL+D)");<BR>}<BR>}<BR>&lt;/script&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;!-- END BOOKMARKS SCRIPT =
--&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PLEASE help. It's driving me=20
nuts!!<BR><BR>Cheers<BR>Lee</DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2><A=20
href=3D"http://www.leebaker.freeserve.co.uk"></A></FONT><FONT =
face=3DArial=20
size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000F_01C3C2DE.2F4A42B0--