View Full Version : Reload all application
Blackdalhia
01-20-2010, 05:56 AM
Hi !
Is there a way in OpenLaszlo to reload the whole application ?
I want my client to check on the server if there is any update, and if yes to fully reload the application ...
thx in advance !
codefux
01-20-2010, 07:28 AM
You can reload a HTML-Website with JavaScript by calling:
location.reload()
From within your OpenLaszlo-App you could call this method with "lz.Browser.callJS()".
Have a look at:
http://www.openlaszlo.org/lps4.7/docs/reference/lz.BrowserService.html
codefux
01-21-2010, 01:26 PM
Here's a little example of it:
<canvas height="600" width="600">
<script>
function reloadPage()
{
lz.Browser.callJS( "location.reload" );
}
</script>
<button onclick="reloadPage()" text="reload" />
</canvas>
kmeixner
01-27-2010, 07:50 AM
Hi,
If you know the URL of the page you could also use lz.Browser.loadURL(url) too.
Kevin
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.