PDA

View Full Version : Ajax "Communication failure" on connection server through localhost:portnumber



sromberg
21 Feb 2011, 7:30 AM
Hi everyone,

I hope I am in the right forum here. I am currently using ExtJs with Ext.ux.FileTreeMenu / Panel
I am "routing" the connection to the actual server via a localhost:port.

This gives me Ajax request failure "Communication failure". I think this might be because of the different "urls" on the server and client? I do see the Ajax request posted to the sever as the .php files is giving output to the console via firephp. So serverside it looks to work fine, there just no request captured on the client side.

So at the point where I print the json as a returnvalue it simply seems not to go to the client at all.
I am currently trying to debug this, but I am not so happy messing around in the core files of ExtJs.

Maybe anyone of you had such an issue already and can point me in the right direction?

Thanks a lot for your support

sromberg
23 Feb 2011, 5:06 AM
Ok, I figured out its possibly the same-origin-issue to prevent xss.

http://my.safaribooksonline.com/book/-/9781849511209/it-s-all-about-the-data/319

So using scripttagproxy might help. But I understand this is ok for custom made Ajax-calls. How can I use this with the store loader of the tree Ext.tree.TreeLoader?

Edit: I found this script example using scripttagproxy for TreeLoader in case anyone else is interessted:

http://www.java2s.com/Code/JavaScript/Ext-JS/ForumSearchViewForumTopicStore.htm

Will try this solution.