Callback funciton on ajax requests


I'm trying to call a javascript function when my ajax request finish, but in outsystems it seems to be much more complicated then it should be.

What a want to do in outsystems is similar to this:

$.post.('some-action', {params:params}, function(res){

    //call a javascript function



Thank you João,
I used the action "RunJavaScript" from the extension HttpRequestHandler, with this action I can call a JavaScript function when the ajax request finish.