On 10/5/07, Jim Hunter <[EMAIL PROTECTED]> wrote:
> I have been playing with trying to get a cross domain request to work for
a
> few hours now with no success. I created a request, and loaded a local
file
> and it does what I want it to do. But as soon as I change the URL to a
> remote location and set the CrossDomain to true, I always get:
>
> ERROR: qx.io.remote.Exchange[447]: There is no transport implementation
> available to handle this request: [object qx.io.remote.Request]
>
> Here is what the code looks like (yes the file exists so there is no issue
> there):
>
> var rpc = new qx.io.remote.Request();
> rpc.setResponseType ('text/html');
>
> rpc.setUrl("http://www.solumina.com/webexpress/top_banner.html");
> rpc.setCrossDomain(true);
> rpc.addEventListener ('completed', function(e){
> var s = e.getData().getContent();
> mainWin.info(s);
> })
> rpc.send();
>
> Anyone have an idea why cross domain does not work? I tried RPC also but
> since I am returning an HTML page it chokes and tells me that it couldn't
> parse the JSON code. I think the RPC request requires JSON.
Hi Jim,
You need to look at your copy of the slides from the qooxdoo presentation at
The Ajax Experience conference. :-)
qooxdoo currently supports three transports which each support particular
user "needs" and MIME types:
XmlHttp
- synchronous or asynchronous
- MIME types:
- Text
- Javascript
- JSON
- XML
- HTML
Iframe
- asynchronous
- file upload
- form fields
- MIME types:
- Text
- Javascript
- JSON
- XML
- HTML
Script
- asynchronous
- cross domain
- MIME types:
- Text
- Javascript
- JSON
Based on the user's selected needs and provided MIME type, the transport is
automatically selected. The order listed above is the preferred order, so
the first transport that satisfies the needs is the one selected.
In your case, you've specified "cross domain" and the only transport that
supports that is the Script transport. You'll notice, though, that HTML is
not one of the MIME types that's supported by Script transport. Therefore,
there is no transport that supports all of your needs, thus the error
message that you're seeing.
If you're so inclined, I can point you to how to write a fourth transport
("Fragment Identifier") that should, I think, satisfy your needs and also be
much more secure than Script transport.
Cheers,
Derrell
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel