0xception
11 May 2007, 3:43 PM
Hello, I'm a fairly light weight developer so please let me know if i'm doing something wrong....
Anyways i have a grid that i'm filling with an XMLReader and i would like to auto reload or refresh that data every 5 sec or so...
so i setup a update manager on the grid object and called startAutoRefresh(5,loadCalls); where loadCalls is a function that just reloads the data.Store object... however this returns a weird firebug error of
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1" data: no]
I'm not entirely sure what this is or why it's happening... if i hook the same function into a on click event then it works just fine.
here is my grid definition:
call = Ext.data.Record.create([
{name: 'CallerId', mapping: 'CallerId'},
{name: 'Status', mapping: 'Status'},
{name: 'Queue', mapping: 'Queue'}
]);
// create the Data Store
ds = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy({url: 'modules/helpdesk.php?a=listCalls'}),
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
record: 'Call',
id: 'UniqueId',
}, call )
});
var cm = new Ext.grid.ColumnModel([
{header: "CallerId", width: 120, dataIndex: 'CallerId'},
{header: "Status", width: 180, dataIndex: 'Status'},
{header: "Queue", width: 115, dataIndex: 'Queue'}
]);
cm.defaultSortable = true;
// create the grid
var grid = new Ext.grid.Grid('grid-example', {
ds: ds,
cm: cm
});
grid.render();
ds.load();
var calls_mgr = Ext.get('grid-example').getUpdateManager();
calls_mgr.startAutoRefresh(5,function () { ds.reload(); });
i took out the loadCalls function here and just made it inline but neither way seems to work.
(by the way if you can't tell... this is basically a copy paste from the example grid :D )
any ideas?
Anyways i have a grid that i'm filling with an XMLReader and i would like to auto reload or refresh that data every 5 sec or so...
so i setup a update manager on the grid object and called startAutoRefresh(5,loadCalls); where loadCalls is a function that just reloads the data.Store object... however this returns a weird firebug error of
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1" data: no]
I'm not entirely sure what this is or why it's happening... if i hook the same function into a on click event then it works just fine.
here is my grid definition:
call = Ext.data.Record.create([
{name: 'CallerId', mapping: 'CallerId'},
{name: 'Status', mapping: 'Status'},
{name: 'Queue', mapping: 'Queue'}
]);
// create the Data Store
ds = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy({url: 'modules/helpdesk.php?a=listCalls'}),
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
record: 'Call',
id: 'UniqueId',
}, call )
});
var cm = new Ext.grid.ColumnModel([
{header: "CallerId", width: 120, dataIndex: 'CallerId'},
{header: "Status", width: 180, dataIndex: 'Status'},
{header: "Queue", width: 115, dataIndex: 'Queue'}
]);
cm.defaultSortable = true;
// create the grid
var grid = new Ext.grid.Grid('grid-example', {
ds: ds,
cm: cm
});
grid.render();
ds.load();
var calls_mgr = Ext.get('grid-example').getUpdateManager();
calls_mgr.startAutoRefresh(5,function () { ds.reload(); });
i took out the loadCalls function here and just made it inline but neither way seems to work.
(by the way if you can't tell... this is basically a copy paste from the example grid :D )
any ideas?