Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

HTML code not working Firefox 29

  • 2 tontu
  • 2 am na jafe-jafe bii
  • 6 views
  • i mujjee tontu mooy 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 moo ko soppali ci

All Replies (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.