javascript to call "Add to favourites"

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

    javascript to call "Add to favourites"

    What is the call? Better yet is there a link to a page that describes all
    the possible javascript calls to the various browser menu items and explains
    compatibility across different browsers? Thanks!


  • steve stevo

    #2
    Re: javascript to call "Add to favourites&quot ;

    You cannot get javascript to automatically add to favourite, choose home
    page etc, the surfer will always be warned.

    <A HREF="javascrip t:window.extern al.Addfavorite( 'http://www.yahoo.co.uk/',
    'Yahoo Home Page')" >Add to Favourites</A>



    "Simon Wigzell" <simonwigzell@s haw.ca> wrote in message
    news:K1r1b.8045 27$ro6.16140034 @news2.calgary. shaw.ca...[color=blue]
    > What is the call? Better yet is there a link to a page that describes all
    > the possible javascript calls to the various browser menu items and[/color]
    explains[color=blue]
    > compatibility across different browsers? Thanks!
    >
    >[/color]


    Comment

    • HikksNotAtHome

      #3
      Re: javascript to call &quot;Add to favourites&quot ;

      >You cannot get javascript to automatically add to favourite, choose home[color=blue]
      >page etc, the surfer will always be warned.[/color]
      [color=blue]
      ><A HREF="javascrip t:window.extern al.Addfavorite( 'http://www.yahoo.co.uk/',
      >'Yahoo Home Page')" >Add to Favourites</A>[/color]

      1) See the FAQ with regards to the use of javascript:


      2) With the aforementioned problem fixed, it still fails in any browser that
      doesn't support window.external .Addfavorite. Its an IE-only thing, and even
      that is not completely true.

      Before using a feature, test for it:

      <input type="button" onclick="addToF avorites()" value="Add To Favorites" />

      function addToFavorites( ){
      if (window.externa l){
      window.external .Addfavorite('h ttp://www.yahoo.co.uk/','Yahoo Home Page')
      }
      else{
      alert('You are using a browser that does not support adding Favorites by
      script, please add it manually');
      }
      }

      I say not all IE's because the AOL client software (PC version) uses IE as a
      shell browser, but it doesn't support the Addfavorite.

      There is no code that will add a site to my favorites in AOL.

      Three ways to add Favorites in AOL:

      1) Right Click>Add To Favorites works but the window.external .AddFavorite
      doesn't work with AOL.
      2)Click the heart that AOL adds to the upper right corner of the browser window
      and that action isn't scriptable.
      Even if you could script clicking that heart, clicking it brings up another
      window that has a menu on it that has to be clicked, to show yet another menu,
      before you actually have saved it to favorites.
      3) Drag the heart to the favorites folder and drop it.

      That is for the PC version of AOL. The MAC versions may act differently.

      So testing for IE features, short of the actual Addfavorite, will fail.
      --
      Randy
      All code posted is dependent upon the viewing browser
      supporting the methods called, and Javascript being enabled.

      Comment

      Working...