But when i tried to run the same example offline thru the downloaded ext 2.1 kit, tree-data.json file which it seems to reference does not load the required data like accordion,anchor,border etc. onto the example.
If somebody can help me in getting to run the example offline...Why Json is not loading..
This has been answered many times; XHR requires a webserver to work properly. There are some workarounds available, but i do not recall what exactly those are.
I'm using IIS 5.1 and i tried adding MIME type json.Also I ran the example in my localhost but still i'm unbale to get the data displayed onto the tree.
At least one of the tree examples uses php for the backend to get the files. That php file assumes json_encode is available, which your version of php may not have. See the stickied thread this forum on json encoding if this sounds like it might be your issue (it's not just php4, it's like php <5.1 or 5.2 or something).
I got the layout browser example working by installing xampp 1.6.6a on my system and placing the EXT 2.1 folder in htdocs folder.
I usually code in vs 2005 and depend on IIS 5.1.So when it clicked to me that php might be missing link i correctly installed php-5.2.5 but still i was not able to run example with IIS.
Any suggestions to run example through IIS might be welcome.
For IIS the response is "HTTP 405 - Resource not allowed Internet Information Services".Its basically an ajax request in ext-base.js which ask for "application/json" but IIS is not permitting the request to go through.
Please let me know the workaround for IIS 5.1 so that this example can run on it.
I really need help of you guys on this. I have banged my head to much extent and still haven't got it solved.
Issue is treeloader which loads json data in tree panel is not displayed through IIS webserver though xampp loads it just fine.Infact I tried running localhost/example.json and it displayed json file contents on xampp while IIS didn't recognise the file type and hence didn't opened.
I tried changing MIME type in IIS viz.
.json = "text/plain","text/html","text/json","application/json" and nothing worked.
In IIS i also tried to set header type i.e content-type="application/json"...It did'nt worked..
Also in treeloader requestmethod which is default "POST" i tried changing it to "GET"...
Still i'm not able to work this....I will be working on weekend to just solve this..
What happens when you request that file directly via IIS?
Jeff Howden
Ext JS - Support Team Volunteer jeff@extjs.com
Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise.
Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me.