JavaScript Menu, DHTML Menu Powered By Milonic
Demo for mm_addToFavorites()
for use with Milonic Solutions' DHTML Menu V5

This sample page was created in reference to this thread and this thread in the "Help and Support for Version 5".

This function is only supported by Internet Explorer. To test the function click any of the above menu items. If your browser accepts the function the page will be added to your favorites list, if not you will receive an alert.

To use the mm_addToFavorites() function:

  1. Place the following code at the top of your menu_data.js file
    
    function mm_addToFavorites() 
    { 
      if (window.external) 
      { 
        if (arguments.length < 1) 
          window.external.AddFavorite(location.href, document.title); 
        if (arguments.length == 1) 
          window.external.AddFavorite(location.href, arguments[0]); 
        if (arguments.length == 2) 
          window.external.AddFavorite(arguments[0], arguments[1]); 
      } 
    else 
    alert("Sorry, your browser doesn't support automated bookmarks.\nYou'll 
    have to do it manually."); 
    } 
    
    
  2. You can add parameters in the aI string if you wish
     
    1. mm_addToFavorites() - no parameters - opens the Add Favorite dialog, using the current page's URL as the favorite location and the current page's title as the favorite name.

      aI("text=Add us to your Favorites;url=javascript:mm_addToFavorites();");


    2. mm_addToFavorites(string favName) - one parameter - opens the Add favorite dialog, using the current page's URL as the favorite location and the value of favName as the favorite name.

      aI("text=Make us a Favorite;url=javascript:mm_addToFavorites('The Best Site Ever');");


    3. mm_addToFavorites(string favURL, string favName) - two parameters - opens the Add favorite dialog, using the value of favURL as the favorite location and the value of favName as the favorite name.

      aI("text=Bookmark Us;url=javascript:mm_addToFavorites('http://www.bestsiteever.com', 'The Best Site Ever');");

You should test each version before uploading to your working site.

DHTML Menu courtesy of Milonic Solutions
Download  mm_addToFavorites() sample