Forum Moderators: open
var urlAddress = "http://www.domainname.com/index.html";
var pageName = "web site name";
function addToFavorites()
{
if (window.external)
{
window.external.AddFavorite(urlAddress,pageName)
}
else
{
alert("Sorry! Your browser doesn't support this function.\nChecck the menu to add manually");
}
}
And I use the link as follows.
<a href="javascript:addToFavorites()">Bookmark This Site!</a>
This link doesn’t work unless the java script (bookmark.js) is in root directory. How can I make this work when the bookmark.js is in a sub directory.