[jQuery] Re: Ajax callback parameter endless

2009-02-06 Thread ilovejquery
I ran this code: function confirm(msg,callback_true,callback_false) { if (1){ callback_true(); }else{ callback_false(); } } confirm('message',function(){ console.log("ok"); }, function(){ console.log('not ok'); }); confirm('message',function(){ consol

[jQuery] Re: Ajax callback parameter endless

2009-02-06 Thread Kpitn
a call like this : confirm('message ?',function(){showAnswer ('1','2','3');}) the function showAnswer is execute 1 time. If i make another call : confirm('message ?',function(){showAnswer ('1','2','3');}) the function showAnswer is execute 2 times. I don't want (n+1) answer after call confirm.

[jQuery] Re: Ajax callback parameter endless

2009-02-06 Thread ilovejquery
Didn't get exactly what you want, but I think you might find useful the fact that you have "arguments" array in body of every function() that has an "array" of arguments. Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Feb 6, 2009 at 7:12 PM, Kpitn wrote: > > Hi >