Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Learn More

HTML code not working Firefox 29

  • 2 Antworten
  • 2 haben dieses Problem
  • 10 Aufrufe
  • Letzte Antwort von 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>

Geändert am von cor-el

Alle Antworten (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.