开发者

How to trigger a JavaScript function on Richface's AJAX success?

I believe there is some way to add a handler to A4J.AJAX to handle the XMLHttpRequest's onSuccess event. Just wondering how can I do that?

Tried very hard, still struggling to find a solution, btw, I am using JQuery as well.

T开发者_开发百科hank you very much for advice.


It is not perfect, but I think follows does what I want:

    // OK, I do not hack other's code, but I do if need
    var originalFinishRequest = A4J.AJAX.finishRequest;
    A4J.AJAX.finishRequest = function(C){           
        originalFinishRequest(C);
                // do your stuff here
    };

I have not go into all source of A4J, so this is only a quick dirty trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜