[Project_owners] Preferences in Mozilla

Jaap A. Haitsma jaap at haitsma.org
Sat Dec 27 00:47:09 EST 2003


Hi,

I'm extending DictionarySearch with a preferences dialog. So you can 
choose your own dictionary :-). It already works in Firebird, but I 
can't get my settings saved in mozilla.
In Firebird the relevant code looks like this.
-------------
<dialog id="dictionary_search_settings_dialog"
         title="DictionarySearch Settings"
         buttons="accept,cancel"
         ondialogaccept="return dictionarySearchSaveSettings();"
         onload="dictionarySearchLoadSettings();"
 
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml">

<script src="dictionarysearchOverlay.js"/>
-------------
This works fine. dictionarySearchSaveSettings() gets called when I hit 
OK :-)

Now for mozilla (seamonkey) I have this.
--------------
<page xmlns:html="http://www.w3.org/1999/xhtml"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       headertitle="Dictionary Search Settings"
       buttons="accept,cancel"
       ondialogaccept="return dictionarySearchSaveSettings();"
       onload="dictionarySearchLoadSettings();">

<script src="dictionarysearchOverlay.js"/>
-----------------

During onload dictionarySearchLoadSettings() gets called correctly but 
when I click on OK dictionarySearchSaveSettings() doesn't get called.

Why is this?? (I guess it has to do that the OK in mozilla is for all 
the preferences)

How do I get it to work correctly?

Thanks,

Jaap


More information about the Project_owners mailing list