addFavorite method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • slash

    addFavorite method

    Hi,
    I need some help adding a redirected page to the favorites. Thanks to
    the help from this user group, I was able to finish a redirect script.
    I was wondering if anybody knew of a method that will allow one to do
    a check in the user's browser's (IE) favorites to see if a bookmark is
    already present. This is what I am trying to accomplish:

    if (window.externa l.checkFavorite (location.href, document.title) )
    do nothing
    else {
    alert("Please update your bookmark.");
    window.external .addFavorite(lo cation.href, document.title) )
    alert("Thank you for update your bookmark. We hope you will enjoy the
    new site!");
    }

    And this gets called in the redirect script.
    The idea is that if a user is trying to access an old page from a
    bookmark, not only am I redirecting them but also giving them the
    opportunity or prompting them to update thier bookmarks. But this
    process should happen only once. That is, when the user revisits that
    bookmark, the bookmark is of course the updated new url so he wouldn't
    be seeing that again.

    Also, where can I get access to the Javascript API...something like
    javadocs for the methods, etc.

    Thanks,
    Slash
  • HikksNotAtHome

    #2
    Re: addFavorite method

    In article <30fe9f1e.03121 91635.229f6c5a@ posting.google. com>, satishi@gwu.edu
    (slash) writes:
    [color=blue]
    >Hi,
    >I need some help adding a redirected page to the favorites. Thanks to
    >the help from this user group, I was able to finish a redirect script.
    >I was wondering if anybody knew of a method that will allow one to do
    >a check in the user's browser's (IE) favorites to see if a bookmark is
    >already present. This is what I am trying to accomplish:
    >
    >if (window.externa l.checkFavorite (location.href, document.title) )
    >do nothing
    >else {
    >alert("Pleas e update your bookmark.");
    >window.externa l.addFavorite(l ocation.href, document.title) )
    >alert("Thank you for update your bookmark. We hope you will enjoy the
    >new site!");
    >}[/color]

    the only thing you can test for is:

    if (window.externa l)

    Any further tests throw errors, in browsers that support it.
    When providing the JS solution to adding a Favorite, you should be checking for
    it though (object detection):

    if (window.externa l){
    //try to use window.external .addFavorite()
    }

    [color=blue]
    >And this gets called in the redirect script.
    >The idea is that if a user is trying to access an old page from a
    >bookmark, not only am I redirecting them but also giving them the
    >opportunity or prompting them to update thier bookmarks. But this
    >process should happen only once. That is, when the user revisits that
    >bookmark, the bookmark is of course the updated new url so he wouldn't
    >be seeing that again.[/color]

    Keep a temporary page at the old bookmark, that redirects after X seconds, with
    a statement "If you have this page bookmarked, please bookmark the new page you
    are being redirected to".

    If the site is worth having as a fav, when told that its being redirected, I
    will update Favorites accordingly.

    JS has no way of checking if a Fav exists or not. In fact, there is no
    foolproof way to even check to make sure .addFavorite() will work (Its been
    discussed and tried before now, to no avail).
    [color=blue]
    >Also, where can I get access to the Javascript API...something like
    >javadocs for the methods, etc.[/color]

    <URL:

    html/js56jsoriversio ninformation.as p />

    Is the MS documentation, although its not a true complete list.

    --
    Randy

    Comment

    Working...