Vacaciones de Navidad de la empresa
Desde el 21 de Diciembre 2015 hasta el 3 de enero 2016, nuestra oficina en Münster trabaja con un equipo mínimo. Soporte limitado está disponible durante este período.
Deseamos a ustedes y sus familas Feliz Navidad y un próspero año nuevo.

 

Archivo: How to force reload or redirection of tray window browser

Descripción

I have a situation where the html loaded in to the tray window browser is requested from a remote application server. If this server happens to be unavailable when SK loads, I will of course get a 404 loaded into the tray window browser. If I later on detect that the server is available, I want to be able to force the tray window browser to reload by setting its document location. Is there a way to access the tray window browser from my external script file in the same way that I can access the main browser with SiteKiosk.WindowList.MainWindow.SiteKioskWindow.SiteKioskWebBrowser.Navigate()?

Respuesta: (2)

Re: How to force reload or redirection of tray window browser 28/06/2006 16:44
Hello,

you can't access the TrayWindow.htm from an external script but you can access the external script from the TrayWindow.html.

Therefore you can define a periodic request that sets a value in your external script.

Something like this:
var valuea = 333;

function setValue(newvalue)
{
valuea = newvalue;
}

function retrieveValue()
{
return valuea;
}

Afterwards you can access this script by using the following code in the TrayWindow.htm:

<SCRIPT TYPE="text/javascript">
<!--
window.external.InitScriptInterface();
//set the value 1 for the variable in the external script, this overwrites the existing value 333
SiteKiosk.ScriptDispatch.setValue(1);
//-->
</script>

<SCRIPT TYPE="text/javascript">
<!--
window.external.InitScriptInterface();
//retrieve the value, this can be done in a completely new html page
var helpvar = SiteKiosk.ScriptDispatch.retrieveValue();
document.write(helpvar);
//-->
</script>

Regards,
Michael Olbrich
Re: How to force reload or redirection of tray window browser 28/06/2006 18:19
Yes, I use that approach a lot in other situations but unfortunately, if the tray window browser does not load properly (e.g. 404), then there will be no HTML in the browser to access the external script periodically. :)

I am looking for a solution to handle the case when the tray window browser is unable to load its contents properly. I don't see any way of forcing it to reload or navigate to a different location.