...

View Full Version : javascript bookmark / favorite issue.



deluxmilkman
12-14-2007, 06:32 PM
I'm trying to make a book mark button the following is what I have.
It shows the alert, but bookmark nothing.
(I'm using Mac.)




function bookmark(title, url){
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

window.external.AddFavorite(url,title);
alert("IE: bookmarked");
}
else if(navigator.appName == "Netscape"){
alert("NETSCAPE: NOT SUPPORTED");
}else{
alert("NOT SUPPORTED");
}
}


<a href="javascript:bookmark('My title','My url');">Click to Bookmark</a>

When I use the following in function, nothing happens.


if (window.sidebar) {
window.sidebar.addPanel(title, url);
} else if( window.external ) {
window.external.AddFavorite( url, title);
}

Can you help me?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum