Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

How do I open a new tab/new URL from a plugin's sidebar?

  • 1 risposta
  • 2 hanno questo problema
  • 19 visualizzazioni
  • Ultima risposta di guigs

more options

I have created a plugin with a sidebar. I would like to be able to change the URL of the current tab in the sidebar's window or open a new tab, given that I click a button in the sidebar (or an event is triggered in the sidebar). I am currently using the following Javascript code to go to a new URL:

content.location = newURL;

However, I have other buttons in the sidebar that open new (small) windows. If I first click one of these buttons to open a new window, then the above code fails; it changes the URL of the tab in THAT NEW WINDOW, not in the window of the sidebar. How do I change this?

This also seems to be complicated by the fact that the sidebar document does not have a parent. Any tips are appreciated!

I have created a plugin with a sidebar. I would like to be able to change the URL of the current tab in the sidebar's window or open a new tab, given that I click a button in the sidebar (or an event is triggered in the sidebar). I am currently using the following Javascript code to go to a new URL: content.location = newURL; However, I have other buttons in the sidebar that open new (small) windows. If I first click one of these buttons to open a new window, then the above code fails; it changes the URL of the tab in THAT NEW WINDOW, not in the window of the sidebar. How do I change this? This also seems to be complicated by the fact that the sidebar document does not have a parent. Any tips are appreciated!

Tutte le risposte (1)

more options

Hi fireferret817, Thank you for your question, however development questions are best answered in stackoverflow.com or the mozllazine.com forums.

If there are any differences made when you change the behavior of opening up a new url this option can be found in the Preferences/Options > Tab menu.