링크 : http://malsup.com/jquery/block/ 


전 ajax 통신중 대용량 비동기 통신을 할때만 걸어놨습니다.


// 기본 셋팅

$.ajaxSetup({

    type        : 'POST',

    async       : false,

    cache       : false,

    contentType : 'application/json; charset=utf-8',

    dataType    : 'json',

    error       : function(xhr,e) {

        $.unblockUI();

        if (xhr.status == 0) {

            alert('You are offline!!\n Please Check Your Network.');

        }

        else if (xhr.status == 404) {

            alert('Requested URL not found.');

        }

        else if (xhr.status == 500) {

            alert('Internel Server Error.\n');

        }

        else if (e == 'parsererror') {

            alert('Error.\nParsing JSON Request failed.');

        }

        else if (e == 'timeout') {

            alert('Request Time out.');

        }

        else {

            alert('Unknow Error.\n'+xhr.responseText);

        }

    },

    beforeSend : function(xhr, setting) {

        if ( setting && setting.async == true ) {

            $.blockUI();

        }

    },

    complete   : function(xhr, e) {

        $.unblockUI();

    }

});//$.ajaxSetup({


posted by 뚱2