DCSIMG
Cross site Ajax plugin for Prototype - Rotem Bloom's Blog

Rotem Bloom's Blog

Share knowledge on .NET and web development

News

About Me

Glad to help and share knowledge on .NET and also huge fan of Dream Theater.

Contact me via messenger

View Rotem Bloom's profile on LinkedIn

Dream Theater Pics

Blogs I Read

Cross site Ajax plugin for Prototype

Thierry Schellenbach has implemented a Prototype plugin that allows you to do cross site remoting using the dynamic script tag method that other frameworks such as Dojo and jQuery have supported for awhile.

You can implement this by simply setting crossSite: true as a config parameter to Ajax.Request.

Code example:

new Ajax.Request('myurl', {
method: 'GET',
crossSite: true,
parameters: Form.serialize(obj),
onLoading: function() {
//things to do at the start
},
onSuccess: function(transport) {
//things to do when everything goes well
},
onFailure: function(transport) {
//things to do when we encounter a failure
}
});
the full information can be found on Thierry Schellenbach blog

Comments

Jonathan Ranes said:

The Schellenbach plugin is tested to work with Safari and several other browsers.  Is there one for JQuery this is also tested for all browsers?  I am not aware of one.

# March 27, 2009 6:07 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: