Home

 

Add the bookmark this link to a Web page

To simplify the process of adding a bookmark to one's bookmark collection in Lotus Connections, the product provides a Bookmark this button that users can add to their toolbar and can click to add the current Web page to their collection. You can add similar functionality to your Web application by adding a Bookmark this link to a page. When a person clicks the link, the Web page is added to the user's Lotus Connections bookmark collection.


The Bookmarks feature provides the following resources to help you create the Bookmark this link:

The post_to_dogear() method is invoked when a user clicks the Bookmark this link. It opens a separate Web browser window in which the user can modify the description or other fields, and then save the bookmark to her collection in the Bookmarks feature.

To add the Bookmark this link to your Web page...

  1. Include the JavaScript library in the <head> HTML block of your Web page. For example, use the following HTML element, replacing "www.example.com/dogear" with the address of your Bookmarks server:

      <script 
       type="text/javascript" 
       src="http://www.example.com/dogear/tools/doglink.js"/>
      

  2. In the Web page, at the location in which you want the Bookmark this link to be displayed, add an onClick event that calls the following method:

      post_to_dogear(url, title, tags, description)
      


    post_to_dogear() method parameters

    Parameter Description
    description Description of the page. You can leave the field blank. If your pages have a <meta> tag for descriptions, you can use JavaScript code to get it and fill the field.
    tags Tags are labels that people can associate with a page to categorize it. You can leave this parameter blank or include default tags that you want people to use. Enter tags as a single word, separated by commas or spaces.
    title Title of the page. Specify document.title to refer to the title of the current page.
    url Web address of the page. Specify location.href to refer to the current page.

    For example:

      <a 
        href="#" 
        style="text-decoration:none;" 
        onclick="DogLink.post_to_dogear(location.href,document.title,'','');
        return false;">
          Bookmark this!
      </a>
      

  3. Recommended: Include a bookmark icon that is displayed on the page in front of the Bookmark this link text.

      <a 
        href="#" 
        style="text-decoration:none;" 
        onclick="DogLink.post_to_dogear(location.href, document.title, '', '');
        return false;">
        <img 
           height=16 
           src="http://www.example.com/dogear/misc/favicon.gif" 
           width=16 
           border=0> 
         Bookmark this!
      </a>
      

    Replace www.example.com with the address of your Bookmarks server.

 

Example

Example:


Extending bookmarks


+

Search Tips   |   Advanced Search