Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Learn More

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

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

  • 2 відповіді
  • 10 мають цю проблему
  • 1 перегляд
  • Остання відповідь від 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?

Усі відповіді (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.