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.
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
Recent Comments