You can pass a limitless (I think) number of arguments when opening a
dialog like follows:

XUL
window.openDialog("chrome://my/package/content/foo.xul",
   "fooDialog",
    "chrome,dialog=yes,close=no,modal=yes",
    var1,
    var2
    var3);

and get at them in script:

JS
var one = window.arguments[0];
var two = window.arguments[1];
// ...

- Brian

Daniel Howe wrote:
> 
> Hi all,
> I need to pass a variable to a modal window, so that when it opens some
> of the user prefs are pre-filled. A similar example is the CookieViewer
> window - if I needed to open that window with the fields for one cookie
> pre-filled & I had the id for that cookie, how could I do this? Any help
> would be great...
> Thanks much,
> /daniel

-- 
Brian King
Developer, ActiveState
http://www.ActiveState.com

Reply via email to