Ram Manoj
20 May 2007, 8:58 PM
I am trying to use grids. The problem comes with setting up the data store.
In the edit-grid/xml-grid example of Ext.
The code is like this:
proxy: new Ext.data.HttpProxy({url: 'plants.xml'})
While I want to load the grid with a similar file from my server.
I have changed the code to:
proxy: new Ext.data.HttpProxy({url: 'http://192.168.0.50:8888/bas/plants.xml'})
I see no contents as part of grid, while showing a script error i.e. Expected: ';' in Internet Explorer. I have made sure I have not made any semi-colon or syntax mistake.
Upon searching through forums, I came to realise to read docs of HttpProxy where the following is given
For cross-domain access to remote data, use an Ext.data.ScriptTagProxy.
Be aware that to enable the browser to parse an XML document, the server must set the Content-Type header to "text/xml".
So I changed the proxy line to :
proxy: new Ext.data.ScriptTagProxy({url:'http://192.168.0.50:8888/bas/plants.xml'})
Still the page shows the same error i.e. Expected: ';' in Internet Explorer without contents as part of grid.
By the way I did not change content of plants.xml from Ext download examples and sent the same content as part of
'http://192.168.0.50:8888/bas/plants.xml'. Offcourse this url opens properly from a new browser window.
I was desperate to use Edit-grid in my application. But could not atleast use the Xml-grid.
I tried all ways of using grids and read through forums.
I even tried to use yui-ext xml-grid example which seems to work accordingly when I replace dataModel.load('sheldon.xml');
with
dataModel.load('http://192.168.0.50:8888/bas/sheldon.xml');
But I cannot go back to yui-ext when the world is moving towards Ext.
Please help.(:|
In the edit-grid/xml-grid example of Ext.
The code is like this:
proxy: new Ext.data.HttpProxy({url: 'plants.xml'})
While I want to load the grid with a similar file from my server.
I have changed the code to:
proxy: new Ext.data.HttpProxy({url: 'http://192.168.0.50:8888/bas/plants.xml'})
I see no contents as part of grid, while showing a script error i.e. Expected: ';' in Internet Explorer. I have made sure I have not made any semi-colon or syntax mistake.
Upon searching through forums, I came to realise to read docs of HttpProxy where the following is given
For cross-domain access to remote data, use an Ext.data.ScriptTagProxy.
Be aware that to enable the browser to parse an XML document, the server must set the Content-Type header to "text/xml".
So I changed the proxy line to :
proxy: new Ext.data.ScriptTagProxy({url:'http://192.168.0.50:8888/bas/plants.xml'})
Still the page shows the same error i.e. Expected: ';' in Internet Explorer without contents as part of grid.
By the way I did not change content of plants.xml from Ext download examples and sent the same content as part of
'http://192.168.0.50:8888/bas/plants.xml'. Offcourse this url opens properly from a new browser window.
I was desperate to use Edit-grid in my application. But could not atleast use the Xml-grid.
I tried all ways of using grids and read through forums.
I even tried to use yui-ext xml-grid example which seems to work accordingly when I replace dataModel.load('sheldon.xml');
with
dataModel.load('http://192.168.0.50:8888/bas/sheldon.xml');
But I cannot go back to yui-ext when the world is moving towards Ext.
Please help.(:|