Is there a way to request permission in IE to use window.external.AddFavorite?

Internet Explorer JavaScript security settings for my clients prevent window.external.AddFavorite from being used and generate (best case) a status bar error when users click the Add Bookmark link on my website. Is there a way to explicitly request permission to use the window.external.AddFavorite method from the user in Internet Explorer when security settings prevent the rest of the window.external methods from being used?

EDIT

Here's the code I'm working with:

<script type="text/javascript">
function addToFavorites() { 
    if (window.sidebar) { // Mozilla uses sidebar 
        window.sidebar.addPanel( document.title, window.location , "");
    } else if (window.external) { // IE uses window.external
        window.external.AddFavorite( window.location, document.title );
    } else { // Who knows ?  Only have to support IE & Moz anyhow.
        alert("Sorry! Your browser doesn't support this function.");
    }
}
</script>

<a href="javascript:addToFavorites()">Bookmark This Page</a>

      

0


source to share


2 answers


It will work, but it must be triggered by a user driven event. (like clicking a link / button)



This means spam / adware / pr 0n sites will automatically load your bookmarks with junk.

+4


source


I just pulled the "Add Bookmark" link from the site. Users know how to do this if they really want to.



0


source







All Articles