Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Learn More

HTML code not working Firefox 29

  • 2 одговорa
  • 2 имају овај проблем
  • 6 прегледа
  • Последњи одговор послао Kohei

more options

The following code used to work under older Firefox versions. It still works under IE 8, but not Firefox 29. The purpose of the code is that clicking on "Click Here to bookmark this webpage!" add the URL www.google.com in my bookmarks (i had to replace <> with [])

[html]
[head]
[title]VPSIR VULNERABILITY[/title]
[link rel="stylesheet" type="text/css" href="Themes/Gray/Style.css"]
[/head]
[body link="#0000ff" vlink="#0000ff" alink="#ff0000" bgcolor="#ffffff" text="#000000" class="GrayPageBODY"]
[a class="GrayDataLink" href="Menu.html"]Menu[/a]
[script src="JS/sorttable.js" type="text/javascript"]
[/script]
  
[p][p] 
[script]
   function bookmark(title, url)
   {
      if (window.sidebar) // firefox
      {
         window.sidebar.addPanel(title, url, "");
      }
      else if (window.opera && window.print) // opera
      {
         var element = document.createElement("a");
         element.setAttribute("href", url);
         element.setAttribute("title", title);
         element.setAttribute("rel", "sidebar");
         element.click();
      } 
      else if (document.all) // ie
      {
         window.external.AddFavorite(url, title);
      }
   }
[/script]
[center]
[div style="cursor:pointer"  onclick="bookmark('Google', 'www.google.com')"]
[font size="6"][strong][big]Click Here to bookmark this webpage![/big][/strong][/font][/div]
[/center]
[p]
[/html]
The following code used to work under older Firefox versions. It still works under IE 8, but not Firefox 29. The purpose of the code is that clicking on "Click Here to bookmark this webpage!" add the URL www.google.com in my bookmarks (i had to replace <> with []) <pre><nowiki> [html] [head] [title]VPSIR VULNERABILITY[/title] [link rel="stylesheet" type="text/css" href="Themes/Gray/Style.css"] [/head] [body link="#0000ff" vlink="#0000ff" alink="#ff0000" bgcolor="#ffffff" text="#000000" class="GrayPageBODY"] [a class="GrayDataLink" href="Menu.html"]Menu[/a] [script src="JS/sorttable.js" type="text/javascript"] [/script] [p][p] [script] function bookmark(title, url) { if (window.sidebar) // firefox { window.sidebar.addPanel(title, url, ""); } else if (window.opera && window.print) // opera { var element = document.createElement("a"); element.setAttribute("href", url); element.setAttribute("title", title); element.setAttribute("rel", "sidebar"); element.click(); } else if (document.all) // ie { window.external.AddFavorite(url, title); } } [/script] [center] [div style="cursor:pointer" onclick="bookmark('Google', 'www.google.com')"] [font size="6"][strong][big]Click Here to bookmark this webpage![/big][/strong][/font][/div] [/center] [p] [/html]</nowiki></pre>

Измењено од стране cor-el

Сви одговори (2)

more options

That was removed all the way back in Firefox 23.

If you need to provide a sidebar in Firefox, your choices are to either build an extension or use the social API.

more options

Firefox has never provided an API to add a bookmark from a Web page. window.sidebar.addPanel was a method to add a sidebar panel literally. IE's external.AddFavorite has also been deprecated. You should not use the method.