29 augustus
Add Bookmark
Add Bookmark
As you may know you can add bookmarks to websites so you can easily go back to them whenever you want. The most common way of doing this is by clicking Favorites, Add To Favorites..., but there is another way. You could place a link on your site which when clicked on opens a pop-up window allowing your users to add a bookmark easily.
How To Do The Above
Right, well if you want to create this function for your website you will need to copy and paste the following code to a text editor e.g. notepad:
<html>
<head>
<title>ADD TO FAVORITES</title>
</head>
<body>
<font face=arial><center>ADD TO FAVORITES</center></font>
<SCRIPT LANGUAGE="JavaScript">
var link = "http://spaces.msn.com/members/keepthechange123";
var title = "HTML Tutorial";
function fav()
{
if(document.all)
window.external.AddFavorite(link,title)
}
fav();
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function exit()
{
if(document.all)
window.close();
}
exit();
</SCRIPT>
</body>
</html>
Editing The Code
Once you have the code in a text document you will need to save this as a .html file e.g. addbookmark.html, changing the addbookmark to whatever you want.
Now just change http://spaces.msn.com/members/keepthechange123 to whatever the link of your MSN Space is. And change HTML Tutorial to whatever you want your page to be called in your users bookmarks.
You will then need to upload this file to an online space, I use 50 Webs. Once you have uploaded the file you will need to create a link to the file on your website, to do this just put this code onto your site:
<a href="linktobookmark.html" target="_blank">Add Bookmark</a>
Changing linktobookmark.html to whatever URL your uploaded file is, and changing Add Bookmark to whatever you want your page to display as a link.
Thats it! You should now have a link that will allow your users to add a bookmark to their page. For an example CLICK HERE.
 |
| |
© RIC-KEEPTHECHANGE123 |