I have this function:
function correctBookmark() {
var title = "SERCO Benefits";
var url = "http://wwww.example.com";
if (window.sidebar) { // firefox
window.sidebar.addPanel(title, url, "");
} else if (document.all) { //MSIE
window.external.AddFavorite(url, title);
} else {
alert("Sorry, your browser doesn't support this");
}
}
If I use an onclick function in association with a button, it works in IE and FF.
If I use:
window.onload = function () { correctBookmark(); }
It works in FF but not IE.
If I use:
$(document).ready(function () {
correctBookmark();
});
It works in FF but not IE.
I want to auto bookmark for the user. Any suggestions?