Рождественские праздники компании
Североамериканская штаб-квартира в Майами, США: 25 декабря 2015, 1 января 2016
Европейская штаб-квартира в г. Мюнстер, Германия: с 21 декабря 2015 по 3 января 2016
Ограниченная поддержка доступна в течение этого периода.
PROVISIO желаем вам веселого Рождества и счастливого Нового Года!

 

Архив: How to force reload or redirection of tray window browser

Описание

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()?

Ответ: (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.