View Full Version : cross domain ajax requestes built into Ajax, TreeLoader, HttpProxy, etc..
vtswingkid
6 Mar 2008, 5:45 AM
I would like to see the script method for sending offsite requests developed for all the request based objects in Ext. In the meantime I have been using Animal's connection overrides. I have overridden TreeLoader to take a url and scriptTag. I am in the process of overriding Ext.data.Store.load to achieve the same affect.
I know that you guys would do a much better job of this. Any chance of it making it in in the near future?
Animal
6 Mar 2008, 7:23 AM
I suspect this is what the roadmap refers to for Ext v2.2
http://extjs.com/roadmap
Animal
6 Mar 2008, 7:24 AM
But with the override, you should not have to touch TreeLoader and Store.
The latest version has a function which detects that the domain is different, and switches to using a script tag. Check the first post in the thread.
vtswingkid
6 Mar 2008, 1:56 PM
Does this work for file uploads?
Animal
7 Mar 2008, 12:04 AM
File uploads do not strictly use "Ajax". That is, they do not use an XMLHttpRequest.
They use a plain old HTML <form> with a target as an iframe, so there are no same-domain problems and the standard Ext.Ajax.request with isUpload:true will work.
File uploads do not strictly use "Ajax". That is, they do not use an XMLHttpRequest.
They use a plain old HTML <form> with a target as an iframe, so there are no same-domain problems and the standard Ext.Ajax.request with isUpload:true will work.
but wouldn't the same domain policy prevent Ext from reading the server reply because it cannot access the document object of this iframe?
JeffHowden
19 Mar 2008, 10:52 AM
but wouldn't the same domain policy prevent Ext from reading the server reply because it cannot access the document object of this iframe?
That is correct.
vtswingkid
24 Mar 2008, 5:00 AM
Animal, your overrides are working great! My client interface is downloaded from a central server which manages various boxes. The client then interfaces with the various boxes directly. It is working like a charm. Now I just need to see how it scales up...100 boxes, 1000 boxes...heh *fingers crossed*
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.