22 Apr 2008 3:26 AM #1
Some Problem with JSON
Just downloaded the cool ext-2.1. Was looking at the example of layout-browser.But there is a minor glitch which i'm not able to get thru.
Online http://www.extjs.com/deploy/dev/exam...t-browser.html this seems to work absolutely fine with all entries getting loaded up in respective layout categories like Basic Ext Layout,custom Layout etc.
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..
22 Apr 2008 2:55 PM #2
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.
23 Apr 2008 4:15 AM #3
JSON data not loading onto treeloader
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.
Please help me in fixing this.
23 Apr 2008 4:22 AM #4
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
Look at the response in firebug.
23 Apr 2008 12:16 PM #5
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).
24 Apr 2008 4:13 AM #6
Got it working with xampp
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.
24 Apr 2008 5:27 AM #7
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.
25 Apr 2008 4:32 AM #8
I'm still unable to run the example in localhost of IIS.Firebug Console gives me error "POST http://localhost:9090/Project/tree-data.json 405 (735ms)
I have attached console.txt to show exact error details.
I tried Mime type as "text/plain" and "text/html"...It still did'nt worked.
But it is still not working
Please let me know how to correct this problem
9 May 2008 6:34 AM #9
JSON not working on IIS 5.1
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..
Please help me out solve this
9 May 2008 6:35 PM #10
- Join Date
- Mar 2007
- Forest Grove, OR
- Vote Rating
What happens when you request that file directly via IIS?Jeff Howden
Ext JS - Support Team Volunteer
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.