PDA

View Full Version : autorefresh cross-domain resources (images) with extjs TaskRunner



babaqga123
16 Sep 2010, 7:29 AM
Hi, forumers,

I am writing an application that takes images from a remote source (my Nagios web interface) and checks them out every so or so seconds. This might require some more explanation:

Nagios has its own web interface, written on PHP, using Kohana, and the javascript library used there is JQuery. So, without any configuration, Nagios will autorefresh its page every 90 seconds and the images will change.

I have created an Ext.Panel with a html config option having one of these images as a source:

htm="<img src=\"+serverIP+"/pnp4nagios/image?host="+store.getAt(j).get("serverName")+"&srv="+srv+"&view="+timeSpan+"&source=0\" width=480 height=300/>";
var Pan=new Ext.Panel(
{
html:htm,
id:'panel',
width:490*3,
resizable:false,
draggable:false
});
This panel is in another panel. How do I make Ext.util.TaskRunner() to refresh the content of the 'panel' panel.

doLayout doesn't refresh the content of src files, so what method should I use?