Hi Sergio,

I am not sure what you mean by "make the bind" but here is an example
doing what you ask using ajax responders:

Ajax.Responders.register({
  onCreate: function(ar)
  {
    ar.options.onSuccess = ar.options.onSuccess ||
Prototype.emptyFunction;

    ar.options.onSuccess = ar.options.onSuccess.wrap(function
(localCB,xhr,xjs)
    {
      // Do your stuffs here
      alert("Apex inboud!");

      // Then call the provided callback
      localCB(xhr,xjs);
    });
  }
});

new Ajax.Request('http://jsbin.com/azeyo',{
  onSuccess: function(xr) { alert("CB:"+xr.responseText); }
});


You can see it working here: http://jsbin.com/afudi and play with the
code here: http://jsbin.com/afudi/edit

Eric

--

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to