var canI = true;
$(window).bind("ajaxComplete", function() {
  function1();
});
function function1(){
  if(canI){
    // your function1() code here
  }
};

Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Thu, Jan 8, 2009 at 5:02 PM, goodsanket <[email protected]> wrote:
>
> Hi all
>
> I am developing a portal and i am kind of stuck.
> I am using multiple AJAX calls to get data dynamically from a JSON
> file.
>
> In one page I am making 2 AJAX calls, and I want to call a function on
> call back from AJAX. I found out a way to do it, its something like
> this,
>
>
>        $(window).bind("ajaxComplete", function() {
>                function1();
>        });
>
> Now problem here is, function1 is being called twice, on each AJAX
> callback. Is there any way so that i can call function1 only once.
>
> Thanks
>
>

Reply via email to