openRico and Synchronous Requests

Uncategorized Add comments

This is a quick and easy fix I made for the openRico / Prototype synchronous request problem, if you use Rico to do your Ajax calls you might have already found it a bit messy to do synchronous requests, this patch for prototype-1.4.0.js will allow fix all those problems, both asynchronous and synchronous requests will trigger correctly.

Download Prototype Synchronous Patch Only
Download Prototype Wonka Patch - This and many other fixes

This are a few examples on how to call a synchronous request with openRico with this patch


ajaxEngine.sendRequest( 'transport', { asynchronous: false, parameters: 'id=1' } );
ajaxEngine.sendRequest( 'transport', { asynchronous: false, parameters: 'id=1', on200: success_function } );
ajaxEngine.sendRequest( 'transport', { asynchronous: false, parameters: 'id=1', onSuccess: success_function } );
ajaxEngine.sendRequest( 'transport', { asynchronous: false, parameters: 'id=1', onFailure: fail_function } );

How to run patch:

 $ patch -p0 <prototype-1.4.0-sync.diff

Business as Usual

2 Responses to “openRico and Synchronous Requests”

  1. jason Says:

    In need of your patch but link appears broken. Any way can send me please. Thanks in advance.

  2. gamaral Says:

    Thanks for the heads up!

    http://downloads.guillermoamaral.com/deprecated/prototype-1.4.0-sync.diff

    http://downloads.guillermoamaral.com/deprecated/prototype-1.4.0-wonka.diff

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in