Use a callback function to do the navigator.plugins.refresh. Something like
The callback function needs to be registered with the InstallTriger object.
InstallTrigger.install(xpi,xpinstallCallback)
"MacTan" <[EMAIL PROTECTED]> wrote in message
9mhl99$[EMAIL PROTECTED]">news:9mhl99$[EMAIL PROTECTED]...
>
> >In an install script, refreshPlugins()
> I tried but it is not working
>
> In the install.js, what I have is something like
> err = performInstall();
> if(err == 0)
> {
> // refresh the plug-in
> refreshPlugins();
> file://alert("Please restart Netscape to finish installation.");
> }
>
> In the html page, I have a 5sec timer that constant check the presence of
> mimetype but it always return undefined.
> function MrscNS6PluginRefresh(){
> // navigator.plugins.refresh(true);
> mrscMimetype = navigator.mimeTypes[mrscAppMoz];
> mrscExistingVer = InstallTrigger.getVersion(mrscPluginPath);
> if(mrscMimetype)
> {
> if( mrscExistingVer != null )
> {
> if( InstallTrigger.compareVersion(mrscPluginPath, mrscNewVer) == 0 )
> {
> clearInterval(mrscPluginTick);
> mrscPluginTicking = false;
> file://location.reload(true);
> }
> }
> }
> };
>
> However, navigator.plugins.refresh(true) is working but it refresh/reload
> the whole page.
> The problem is that I don't know if the installation completed.
>
>
> thanks.
>
>
>
>
> "Daniel Veditz" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Daniel Veditz wrote:
> >
> > > MacTan wrote:
> > >
> > >>
> > >> Is it possible to refresh the plugin after installation.
Currently,
> I
> > >> need to restart netscape in order for the plugins to be registered.
> > >
> > > From a browser window, navigator.plugins.refresh(true) just as in
> > > Communicator
> > >
> > > In an install script, refreshPlugins()
> >
> > That command should go *after* the performInstall() in your script,
> because
> > that's when the actual install happens. You probably should check the
> return
> > value from performInstall(), too, to make sure it's SUCCESS (0).
> >
> > -Dan Veditz
> >
>
>