faqts : Computers : Programming : Languages : JavaScript : Links

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

16 of 42 people (38%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Can I use javascript to create a "bookmark my page" link in netscape 7

Dec 13th, 2002 12:08
Klaus Bolwin, Miguel Rosas,


No, to my knowledge, it is not possible to create such a bookmark link
in NS6+ or Mozilla, however there is another alternative possibilty:
You can create a link, which adds a new folder in the sidebar of the
client browser.
first you must design a HTML-file, containing the sidemap or a
navigation menue of your URL. In the example below, this file is named
"sidebar.html".
Then call the following function by a link:
function addSidebar()
        {
        if ((typeof window.sidebar == "object") && (typeof
window.sidebar.addPanel == "function"))
           {
           window.sidebar.addPanel ("Page-title",
"http://URL/sidebar.html","");
           }
        else
           {
           var rv = window.confirm ("Only available for Gecko based
browsers. \nDownload Mozilla?");
           if (rv)
              document.location.href = "http://www.mozilla.org/";
           }
        }