thewolfe
Posts: 237 +0
Add to Favorites script
I would like to use the following script for "bookmarks" because you can use it with Explorer and Netscape. However, when I just add the script into the body it automatically inserts a "Click here to bookmark this page!" text and puts it at the top of the page.
How do I change the script so that I can hyperlink my text at the location I want to put it. Also, what URL: do I use to link to.
Here's the script.......
http://www.simplythebest.net/scripts/_javascript_100.html
This script opens the "Add to favorites" window in Internet Explorer, but displays a "Remember to bookmark" message in Netscape.
EXAMPLE
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html) Click here to bookmark this page!
Netscape users should see the message "Remember to bookmark this page! (CTRL-D)".
1) Insert the below script in the <BODY> section where you want the bookmark message to appear on your page
<SCRIPT language="_JavaScript">
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
<!--
if (navigator.appName == 'Microsoft Internet Explorer' &&
parseInt(navigator.appVersion) >= 4)
{
document.write('<font face=\"arial\" size=\"2\"><b><a href=\"#\" onfiltered=\"_javascript:window.external.AddFavorite(location.href,document.title)\">');
document.write('Click here to bookmark this page!</a></font></b>');
}else
{var msg = "Remember to bookmark this page!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
document.write(msg);
}
// -->
</SCRIPT>
2) Define the message and the style of the link in this section of the script:
document.write('<font face=\"Arial\" size=\"2\"><b><a href=\"#\" onfiltered=\"_javascript:window.external.AddFavorite(location.href,document.title)\">');
document.write('Click here to bookmark this page!</a></font></b>');
}else
{var msg = "Remember to bookmark this page!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
I would like to use the following script for "bookmarks" because you can use it with Explorer and Netscape. However, when I just add the script into the body it automatically inserts a "Click here to bookmark this page!" text and puts it at the top of the page.
How do I change the script so that I can hyperlink my text at the location I want to put it. Also, what URL: do I use to link to.
Here's the script.......
http://www.simplythebest.net/scripts/_javascript_100.html
This script opens the "Add to favorites" window in Internet Explorer, but displays a "Remember to bookmark" message in Netscape.
EXAMPLE
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html) Click here to bookmark this page!
Netscape users should see the message "Remember to bookmark this page! (CTRL-D)".
1) Insert the below script in the <BODY> section where you want the bookmark message to appear on your page
<SCRIPT language="_JavaScript">
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
<!--
if (navigator.appName == 'Microsoft Internet Explorer' &&
parseInt(navigator.appVersion) >= 4)
{
document.write('<font face=\"arial\" size=\"2\"><b><a href=\"#\" onfiltered=\"_javascript:window.external.AddFavorite(location.href,document.title)\">');
document.write('Click here to bookmark this page!</a></font></b>');
}else
{var msg = "Remember to bookmark this page!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
document.write(msg);
}
// -->
</SCRIPT>
2) Define the message and the style of the link in this section of the script:
document.write('<font face=\"Arial\" size=\"2\"><b><a href=\"#\" onfiltered=\"_javascript:window.external.AddFavorite(location.href,document.title)\">');
document.write('Click here to bookmark this page!</a></font></b>');
}else
{var msg = "Remember to bookmark this page!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";