jquery Programming Glossary: method1
jQuery.when understanding http://stackoverflow.com/questions/5280699/jquery-when-understanding var count 0 var dfr var showData function data dfr.resolve alert count Do something with my data data received var method1 function dfr .Deferred return .ajax 'localhost MyDataService DataMethod_ReturnsData' dataType jsonp jsonp callback success.. DataMethod_ReturnsCount' dataType jsonp jsonp callback success function data count data.d.__count .when method1 method2 .then showData However this is not working as expected. Ajax call in method1 will return data which is to be used.. data count data.d.__count .when method1 method2 .then showData However this is not working as expected. Ajax call in method1 will return data which is to be used in showData and Ajax call in method2 will return count which is to be assined to var..
|