Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Več o tem

How do I, using Javascript, uncheck the 'Load this bookmark in the sidebar'?

  • 2 odgovora
  • 10 ima to težavo
  • 1 ogled
  • Zadnji odgovor od cor-el

more options

I am trying to write javascript code to 'Add to Favorites' / Bookmark this page'. My current function is: function doAddToFavorites (sLoc) { var title='SDLC Form and Template Solutions' var sFullURL = 'http://www.' + sLoc if (window.sidebar) // firefox window.sidebar.addPanel (title, sFullURL, ); else if (window.opera && window.print) // opera { var elem = document.createElement ('a') elem.setAttribute ('href', sFullURL) elem.setAttribute ('title', title) elem.setAttribute ('rel', 'sidebar') elem.click () } else if (document.all) // ie window.external.AddFavorite (sFullURL, title); else ; }

When I click on the 'Add To Favorites' image and execute this Javascript, it works except the 'Load this bookmark in the sidebar' is checked'. What do I need to change to uncheck this box?

I am trying to write javascript code to 'Add to Favorites' / Bookmark this page'. My current function is: function doAddToFavorites (sLoc) { var title='SDLC Form and Template Solutions' var sFullURL = 'http://www.' + sLoc if (window.sidebar) // firefox window.sidebar.addPanel (title, sFullURL, ''); else if (window.opera && window.print) // opera { var elem = document.createElement ('a') elem.setAttribute ('href', sFullURL) elem.setAttribute ('title', title) elem.setAttribute ('rel', 'sidebar') elem.click () } else if (document.all) // ie window.external.AddFavorite (sFullURL, title); else ; } When I click on the 'Add To Favorites' image and execute this Javascript, it works except the 'Load this bookmark in the sidebar' is checked'. What do I need to change to uncheck this box?

Vsi odgovori (2)

more options

Yes, this seems to be a tricky one. There have been several times, today, I thought I might have a fix for this, but all have failed. If any of you have solved this, please let us know. Some site are loading a alert box with instructions to uncheck - like this:

... alert("Please perform the following once you added bookmark:\n\n 1. Click on Bookmarks -> Organize bookmarks \n 2. Select the newly added bookmark and click on properties \n 3. Uncheck for 'Load this bookmark in the sidebar' \n\n For information, refer the user guide"); window.sidebar.addPanel(title, href,"",""); ...

Thanks, Kevin Crothers

more options

That is not possible. All bookmarks created via that JavaScript method open by default in the sidebar and that can't be changed otherwise then by editing the bookmark. It would be better to instruct visitors to press Ctrl + to bookmark the website. Bookmarks created that way are saved in the Bookmarks Menu folder and not in the Unsorted folder like when you click the star on the location bar.