본문 바로가기
Programming/Web

ajax 순차적으로 진행을 위한 방법

by Chan_찬 2014. 5. 23.
728x90
반응형

1st ajax success부분에 2nd ajax 로직을 넣어라.

     function ajaxModule(DATA,Url,Fn){
          $.ajax({
               type:"POST",        //POST GET
               url:Url,     //PAGEURL
               data : DATA,
               timeout : 30000,       //제한시간 지정
               cache : false,        //true, false
               success: function whenSuccess(arg){  //SUCCESS FUNCTION
                    Fn(arg);
               },
               error: function whenError(x,e){    //ERROR FUNCTION
                    ajaxErrorAlert(x,e);
               }
          });
     }


728x90
728x90
BIG
Buy me a coffeeBuy me a coffee

댓글