faqts : Computers : Programming : Languages : JavaScript : Browser Settings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

84 of 108 people (78%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can I add a page to the favorites/bookmark list?
How can I add a page to the favorites/bookmark list?
How can I add a page to Bookmark in Netscape7
How can I add a page to Bookmark in Netscape7

Jan 23rd, 2003 06:14
Klaus Bolwin, Martin Honnen, Delaney Hee Kuan Weng,


IE4/5 has support for that NN3/4 not:
  window.external.addFavorite('url', 'title')
as for example in
  window.external.addFavorite('http://javascript.faqts.com', 
                              'JavaScript Knowledge Base')
or in
  window.external.addFavorite(location.href, document.title)
to add the current page
However, there is another interesting possibility for Netscape7 / Mozilla:
First of all, you should create a HTML-file (e.g. sidebar.html)
containing a site map or navigation panel of your site. This file can be
added to the sidebar tabs of the client.
All you have to do is to add a link to your site, calling the following
function:
function sidebar()
        {
        if ((typeof window.sidebar == "object") && (typeof
window.sidebar.addPanel == "function"))
           {
           window.sidebar.addPanel ("Name of the tab",
"http://www.your-domain.com/sidebar.html","");
           }
        else
           {
           var rv = window.confirm ("This function is available in
Gecko-based browsers only. \nwould you like to change to www.mozilla.org?");
           if (rv)
              document.location.href = "http://www.mozilla.org/";
           }
        }