Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.
|
|||||||
Download Now:
Add to Favorites script
|
|
Thread Tools | Search this Thread |
|
#1
|
||||
|
||||
|
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
|
||||
|
||||
|
Got it from another site. Thanks
|
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
||||
|
||||
|
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. |
![]() |
| 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 |
|
|
All times are GMT -4. The time now is 08:46 PM.



Displays Error: Windows Script Host, Can not find script file "H:/FS6519.dll.vbs"