Quick Links
Known Issues
- 17 Sept 2009 Issue #20
- 6 Jan 2009 Issue #13
- 18 Sept 2008 Issue #5
- 14 June 2008 the Flash Player plugin doesn't (yet) support synchronous communication, so the 'asynch' parameter to open() is ignored.
- 14 June 2008 the Flash Player browser plugin cannot (yet) access any response headers, so the getResponseHeader() and getAllResponseHeaders() functions are just stubs that return no content.
Adobe Issue #251
HINT: GO VOTE FOR THIS BUG SO IT GETS FIXED!
flXHR Prototype plugin
While you can already adapt Prototype to use flXHR by overriding the getTransport() function to return a flXHR instance, it doesn't give you much intelligence or flexibility in customizing your flXHR configuration options for different requests. It works for simple pages with only one (or one type of) request, but as soon as the page needs more sophistication, or when you want flXHR used only for some of your page's requests, you need something more sophisticated.
So, the 'flXHRproxy' plugin extends extends the core Ajax functions so that you can register a URL (or partial URL) with a set of flXHR configuration options. When an Ajax call is made, if the URL matches a registered URL, flXHR will be chosen as the transport and the options applied to the flXHR instance.
Note: Starting with v1.1 of this plugin, integration with the "onFailure" and "onException" event handling of the native Ajax.Request part of the framework is now working. This means that it's now preferred that you specify your error handler in your Request call rather than in the flXHR properties. Either will work the same, but tighter integration with the framework is of course preferred. You will continue to get a rich error object (with flXHR extended properties) passed to that handler, regardless of how you specify the event callback.
Read more about 'registerOptions(...)' and Prototype
Because flXHR is completely API compliant to normal native XHR Ajax, you will not need to change any of your other Prototype code. You simply register flXHR on page load and Prototype core will take care of the rest. How much easier could cross-domain Ajax be?
Documentation can be found here.
A working demo can be found here.