'2019/01/04'에 해당되는 글 2건

  1. 2019.01.04 ajax / promise / jquery
  2. 2019.01.04 ajax async와 jquery
Programming/jquery2019. 1. 4. 15:13

의외로 간단하네.. 한번 써봐야겠다..

어떤 건 new Promise 해서 ㅎ야 한다는데 그렇게 복잡하게 해야하나 싶긴 하지만..


// Example 2

var promise1 = $.ajax("/myServerScript1");

var promise2 = $.ajax("/myServerScript2");

 

$.when(promise1, promise2).done(function(xhrObject1, xhrObject2) {

  // Handle both XHR objects

});

promise.done(myShowInfoFunction);

promise.fail(myErrorFunction); 

[링크 : https://gist.github.com/steveosoule/6453185]


[링크 : http://han41858.tistory.com/11]

[링크 : http://epthffh.tistory.com/entry/promise-패턴-예제]


'Programming > jquery' 카테고리의 다른 글

jquery ajax json flask  (0) 2019.01.07
jquery this 버튼 checked  (0) 2019.01.07
ajax async와 jquery  (0) 2019.01.04
jquery ajaxsetup()  (0) 2018.12.14
jquery draggable  (0) 2018.12.09
Posted by 구차니
Programming/jquery2019. 1. 4. 15:08

jquery ajax에서 async:false 하면 동기로 작동하는건 jquery 1.8 이후로 막혔다고 한다.

어쩐지.. ㅠㅠ


결국에는(?) promise를 써봐야겠네 흑... ㅠㅠ


[링크 : https://okky.kr/article/408594]

[링크 : http://epthffh.tistory.com/entry/promise-패턴-예제]

'Programming > jquery' 카테고리의 다른 글

jquery this 버튼 checked  (0) 2019.01.07
ajax / promise / jquery  (0) 2019.01.04
jquery ajaxsetup()  (0) 2018.12.14
jquery draggable  (0) 2018.12.09
jquery select 인덱스 얻기  (0) 2018.12.05
Posted by 구차니