Improved event support for flXHRproxy plugins for jQuery, Dojo, Prototype, and Mootools!

getify | Ajax, flXHR, flensed | Thursday, July 9th, 2009

Thanks to Zohaib (MaXpert), flXHR now has a flXHRproxy plugin for Mootools! If you’re using Mootools and doing cross-domain Ajax, flXHRproxy is your new best friend!

Also, inspired by the code we worked out for the Mootools plugin, I have released updates to the jQuery plugin, Dojo plugin, and the Prototype plugin. These three plugins now play nicely with each respective framework’s built in error mechanism for normal Ajax calls.

Prior to this release, error handling was only possible by manually setting the “onerror” property in the flXHR instance configuration properties. This same functionality is still supported. But now the recommended approach is to specify your error callbacks directly in your Ajax/Xhr calls as you normally would. Note: Do only one or the other, not both, to avoid duplicate callback execution in some circumstances.

Now that flXHRproxy is more tightly integrated with each framework’s event mechanism, the ease with which you can make cross-domain Ajax calls just keeps getting better and better! Really, what excuse do you still have for not using flXHR for your next cross-domain Ajax call?

One last note: the jQuery update also includes one additional change. The “success” callback function signature is now extended to include a third parameter, which is set to the flXHR instance (XHR) that generated the call/response. This makes it much easier to determine which specific Ajax call the response comes from.

flXHR gets some Prototype love, cross-domain Ajax wins!

getify | Ajax, flXHR, flensed | Friday, May 22nd, 2009

In the wake of the jQuery flXHRproxy and Dojo flXHRproxy plugins recently released, Prototype was unfortunately left out of having a good solid plugin for flXHR… until now!

Austin resident Prototype guru Andrew Dupont recently wrote an initial version of the plugin, which I then modified and tested, and we now have a great plugin for Prototype to support flXHR in the same way as the other frameworks.

Just like with the other framework plugin versions, you simply call ‘registerOptions(…)’ to register a URL (or partial URL) destination target and a set of flXHR options to be used for that location. Then, when you later make various Ajax calls, Prototype will internally figure out if you are calling to a location that is registered and will use flXHR with the options you specified.

There is simply no other way to get easier cross-domain Ajax with Prototype than with flXHR and flXHRproxy. Take a look at flXHRproxy documentation or give the Prototype+flXHR demo a whirl.

Typical page usage might look like this:

Ajax.flXHRproxy.registerOptions('http://www.mydomain.com/',{xmlResponseText:false...});
Ajax.flXHRproxy.registerOptions('http://rss.mydomain.com/',{xmlResponseText:true...});
...
Ajax.Request('http://www.mydomain.com/something.html',{...});
...
Ajax.Request('http://rss.mydomain.com/feed.html',{...});

Enjoy the new world of possibilities and fun that Prototype and flXHRproxy now gives you for doing easy cross-domain Ajax!

flXHR+Dojo=Cross Domain Ajax Fun!

getify | Ajax, flXHR, flensed | Thursday, May 14th, 2009

Back in march, I announced the jQuery plugin for flXHR, simply the best way to do cross-domain Ajax with jQuery. It has enjoyed huge success in traffic/downloading since, and that proves that there are lots of people out there who are doing cross-domain Ajax with frameworks like jQuery and Dojo, and that people are craving for better, easier and more flexible ways of doing so. flXHR is the answer to your cross-domain Ajax woes.

Building on the success from the jQuery plugin, I’m now pleased to announce that I’ve released a Dojo plugin for jQuery which is nearly identical in functionality. Basically, all you have to do is load the ‘flXHRproxy’ Dojo plugin, and then call ‘registerOptions(…)’ to register a URL (or partial URL) destination target and a set of flXHR options to be used for that location. Then, when you later make various Ajax calls, Dojo will internally figure out if you are calling to a location that is registered and will use flXHR (or any other transports you register!) with the options you specified.

If you use Dojo, and you do cross-domain Ajax calls, I urge you to consider flXHR and flXHRproxy. Take a look at flXHRproxy documentation or give the Dojo+flXHR demo a whirl.

Typical page usage might look like this:

dojox.io.flXHRproxy.registerOptions('http://www.mydomain.com/',{xmlResponseText:false...});
dojox.io.flXHRproxy.registerOptions('http://rss.mydomain.com/',{xmlResponseText:true...});
...
dojo.xhrGet({url:'http://www.mydomain.com/something.html'...});
...
dojo.xhrGet({url:'http://rss.mydomain.com/feed.html'...});

This XHR registry concept is very powerful, as it allows you to have multiple different types of Ajax calls and transports and configurations for different types of data that you are mashing up in a single page. It takes all the guess work out of configuring your code to intelligently use the right communication method and options as needed for each Ajax call. It just simply could not get any easier to do cross-domain Ajax calls with Dojo now.

Enjoy the new world of possibilities and fun that Dojo+flXHR now gives you for doing easy cross-domain Ajax!

PS. Teaser: Coming soon, flXHR+YQL = cross-domain Ajax to literally any site on the internet! How cool is that!?


Page 1 of 8123...Last »