Yes. The URL that you trigger should be followed with a questions mark and
the argument string you wish to pass to the install script. The install
script can access the argument string in the Install.arguments property.
Example trigger page:
...
var xpi = {'Test Passing
Args':'http://yourserver.yourdomain.com/yourxpi.xpi?yourArgument even with
spaces'};
InstallTrigger.install(xpi, yourCallback);
...
Example corresponding install script:
...
alert(Install.arguments);
...
The alert should display everything after the question mark. Due to a bug
in Netscape 6 the string in Install.arguments is preceded with the last
letter of the xpi file name, usually "i" and the question mark from the
URL. So the string that will be displayed in this case will be
"i?yourArgument with spaces" instead of "yourArgument with spaces". But
this is fixed in current mozilla builds. Trust this suffices.
~Samir
shinagawa wrote:
> Is there any way to pass a parameter (JavaScript) from a web page into
> XPInstall or a way to reference JS variables from the install.js script ?
> This is needed for the File.execute method.
>
> Thanks in advance,
> Randy