[jQuery] Ajax hacks

[jQuery] Ajax hacks

I modified the ajax plugin for my needs. Basically, I added a
parameter 'context' which can carry any data needed in the function
'ret'.
For example:
...
function result(data, modifiedObj) {
    if (!(json = myEval(data))) {
        $(modifiedObj).remove();
...
Tell me what you think...
$.get = function( url, ret, context, type ) {
$.xml( "GET", url, null, function(r) {
if ( ret ) ret( $.httpData(r,type), context );
});
};
$.getXML = function( url, ret, context ) {
$.get( url, ret, context, "xml" );
};
$.post = function( url, data, ret, context, type) {
$.xml( "POST", url, $.param(data), function(r) {
if ( ret ) ret( $.httpData(r,type), context );
});
};
$.postXML = function( url, data, ret, context ) {
$.post( url, data, ret, context, "xml" );
};
Franck.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/