also @ TechSpot: HP TouchPad running Android 4.0 Ice Cream Sandwich
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > Software > Software Apps

Download Now:

Add to Favorites script

Thread Tools Search this Thread
  #1  
Old 07-19-2002
thewolfe's Avatar
TechSpot Enthusiast
 
Member since: Feb 2002, 287 posts
Add to Favorites script

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...cript_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)";
  #2  
Old 07-21-2002
thewolfe's Avatar
TechSpot Enthusiast
 
Member since: Feb 2002, 287 posts
Got it from another site. Thanks
  #3  
Old 07-21-2002
Phantasm66's Avatar
TechSpot Evangelist
 
Location: Glasgow, Scotland
Member since: Feb 2002, 6,504 posts
Quote:
Originally posted by thewolfe
Got it from another site. Thanks
care to share, then? if it was important enough to post about its important enough to share the solution...
  #4  
Old 07-21-2002
thewolfe's Avatar
TechSpot Enthusiast
 
Member since: Feb 2002, 287 posts
Sure. It was almost to simple. The way the script is set up, all you have to do is insert the text at the exact spot that you want the 'Click here to book mark this page! text to show up.

My dilemma was figuring out where exactly to paste text. But since I had additional text in that area on my page I could figure it out from that.

You can then change that verbiage to whatever you want.

You do not have to hyperlink because it does it for you.

If my explanation is lacking, post again and I'll try it again.
Closed Thread

Similar Topics
Topic Replies Forum
Displays Error: Windows Script Host, Can not find script file "H:/FS6519.dll.vbs" 0 Virus and Malware Removal
Favorites Gone 2 Windows OS
Favorites 7 Virus and Malware Removal
Logos in 'Favorites' 4 Software Apps
Favorites in IE6 7 Windows OS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 08:46 PM.