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 { and } 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)
{
//***---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')
{
window.external.AddFavorite(url, description);
}
else if (navigator.appName=3D=3D'Netscape')
{
alert(netscape);
}
}
//-->
</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 { and } 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 &#123 and &#125 plus I get an =
'error=20
on page'.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><!--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>&#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> </DIV>
<DIV><FONT face=3DArial size=3D2>if (navigator.appName=3D=3D'Microsoft =
Internet=20
Explorer')<BR>&#123;<BR>window.external.AddFavorite(url,=20
description);<BR>&#125;<BR>else if=20
(navigator.appName=3D=3D'Netscape')<BR>&#123;<BR>alert(netscape);<BR>=
&#125;<BR>&#125;<BR>//--></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></SCRIPT><BR> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><B><A=20
HREF=3D"javascript:bookmark('http://astonvilla.blogfootball.com/lions/','=
Lions=20
Blog');">Add Lions Blog to Your Favourites (STILL NOT WORKING....DO =
NOT=20
CLICK!)</A></B><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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 &#123 and &#125 in the =
template):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><!-- ADD TO BOOKMARKS FAVOURITES=20
--><BR><font STYLE=3D"font-family:VERDANA; =
font-size:8PT;"><BR><script=20
language=3D"JavaScript"><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("<a=20
href=3D\"javascript:window.external.AddFavorite(url, title)\">" + =
message=20
+"</a>");<BR>} else {<BR>document.write("Lions Blog");<BR>if=20
(document.layers) {<BR>document.write(" (Press=20
CTRL+D)");<BR>}<BR>}<BR></script></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><!-- END BOOKMARKS SCRIPT =
--></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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> </DIV></FONT></DIV>
<DIV><FONT face=3DArial color=3D#000000 size=3D2></FONT> </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> </DIV></BODY></HTML>
------=_NextPart_000_000F_01C3C2DE.2F4A42B0--