The only code being used is:
Code:
function addbookmark(){
if (document.all) {
window.external.AddFavorite(window.location.href,document.title);
} else {
alert("Use CTRL-D to add a bookmark in your Browswer.");
}}
IE and Opera both support document.all - so will attempt:
Code:
window.external.AddFavorite(window.location.href,document.title);
I believe that will give an error in IE if the page is local. Perhaps even with a live page. In Opera, there is no window.external.AddFavorite, so there will just be an error, but Opera is usually silent when it encounters script errors.
All others presumably will do:
Code:
alert("Use CTRL-D to add a bookmark in your Browswer.");
If that's all that you want to have happen anyway, just change the function to:
Code:
function addbookmark(){
alert("Use CTRL-D to add a bookmark in your Browswer.");
}
Bookmarks