Hybrid View
-
21 Jul 2009 5:29 AM #1
How to read XML files in ExtJS locally?
How to read XML files in ExtJS locally?
Hi all -
I am using ExtJS locally for development.
The XML Grid Example on the Samples page runs fine:
http://extjs.com/deploy/dev/examples/grid/xml-grid.html
but when I try to run the same example from the extjs directory, the XML data does not get loaded:
ext-2.2\examples\grid\xml-grid.html
This is a major roadblock to me. Could someone suggest me on how can I run these examples locally?
Thanks- K
-
21 Jul 2009 5:30 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Publish them on a local webserver (Apache?).
(or you could use the ext-basex user extension to add local file access support)
-
21 Jul 2009 5:36 AM #3
Hi Condor,
Thank you for your response.
I would like to use ext-basex user extension but I do not know how to use it.
I had found a thread by Doug Hendricks:
http://extjs.com/forum/showthread.php?p=52350#post52350
but it has so many posts that it is turning out to be really difficult to follow. So, if you don't mind, I would appreciate if you could tell me in simple steps on what should I do to run these XML examples locally?
Thanks- K
-
21 Jul 2009 5:59 AM #4
If you can't read/follow that thread, I would say you shouldn't be using that extension. Start from the top of it and look at Doug's examples and code. It's not difficult to use if you take the time to understand it.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
21 Jul 2009 6:04 AM #5
tryanDLS,
You are referring to the following thread right?
http://extjs.com/forum/showthread.php?t=21681
Earlier, I pasted the thread on localXHR.js and then I later realized that there is a separate thread on Ext-baseX.
Correct me if I am wrong.
Thanks- K
-
21 Jul 2009 9:45 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Use the ext-basex.js file from this post.
ps. You might need to set:
to make Ext use ActiveX for IE instead of XmlHttpRequest (which doesn't support local file access).Code:Ext.lib.Ajax.forceActiveX = true;
Also, in Firefox you can only access file below your current directory (or you need to change a security.fileuri.strict_origin_policy in about:config).


Reply With Quote