1

Is there a way to detect when one of the plugins successfully completes ajax call using $.ajax. I am using a treeview plugin that calls asp.net webservice, and I want to attach context menu to the branches/leafs once they've been loaded.

1
  • hook the $.ajax function Commented Jan 9, 2010 at 17:57

2 Answers 2

2

Have you looked into $.ajaxComplete();, $.ajaxSuccess();, or the callback functions within the requests themselves:

$.post("somepage.php", {var:"val"}, function(results) { /* this is the callback, which happens after the response is received */ alert(results); }); 

Take a look at the other Global Ajax Event Handlers.

Sign up to request clarification or add additional context in comments.

1 Comment

Awesome, I was about to modify the script to create custom event in the plugin.
0

Use the "success" function

$.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ //the action to be done when the call is complete } }); 

1 Comment

I cannot use success function, one plugin does not know about the other one.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.