-1

i am building a thunderbird extension and enabled the options popup by adding following to the install.rdf

 <em:optionsURL>chrome://content/options.xul</em:optionsURL>

this enables the button but on clicking it nothing happens. the options.xul looks like as below

<?xml version="1.0"?>

<prefwindow id="EmailToOSN-prefs"
     title="StockWatcher 2 Options"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<prefpane id="sw2-stock-pane" label="Stock Settings">
  <preferences>
    <preference id="pref_symbol" name="extensions.stockwatcher2.symbol" type="string"/>
  </preferences>

  <hbox align="center">
    <label control="symbol" value="Stock to watch: "/>
    <textbox preference="pref_symbol" id="symbol" maxlength="4"/>
  </hbox>
</prefpane>

</prefwindow>
Vik
  • 8,721
  • 27
  • 83
  • 168

1 Answers1

0

Assuming that you have a folder content where you have placed your code files (including options.xul)

  1. First you have to declare this "content" folder in your chrome.manifest file by adding this line:

    content extension_name content/
    
  2. Second in your install.rdf file you must write this:

    <em:optionsURL>chrome://extension_name/content/options.xul</em:optionsURL>
    
  3. Third add this line in your options.xul file inside the prefwindow tab:

    <script type="application/x-javascript" src="chrome://extension_name/content/options.js" />
    

    where options.js will be your javascript code you will use for this options window

Hope I helped...