How to add bookmark to safari using JavaScript?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachinadhau
    New Member
    • May 2012
    • 1

    How to add bookmark to safari using JavaScript?

    Hi Team,

    Requirement is to add a fixed url, (e.g. http://facebook.com) as bookmark to safari - browser on click of a hyperlink.


    For Example: Following works in IE and Firefox but does nto work in Safari.


    Code:
    <a href="javascript:if(document.all)window.external.AddFavorite('http://facebook.com','facebook'); else if(window.sidebar)window.sidebar.addPanel ('facebook','http://facebook.com','');">bookmark    http://safari.com</a>
    I found that many other developers have same requirement but no solution.

    Can someone atleast confirm if it is not possible in the current safari version?

    Thanks,
    Sachin
    Last edited by acoder; May 23 '12, 04:12 PM.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    As far as I can tell, no, it isn't possible.

    Adding a bookmark can be done by a simple click in most browsers, so these bookmarking scripts are for the most part redundant.

    Comment

    Working...