javaScript] Ajax
$.ajax({
url: "/Category/ProductCategoryJR"
, data: { depth: depth, parentIDX: parentIDx }
, dataType: "json"
, method: "POST"
, beforeSend: function(jqXHR, settings) {
$(targetID + " > option").remove();
$(targetID).prepend("<option value=''>카테고리 수집중...</option>");
}
}).success(function(a, b, c) {
$(targetID + " > option").remove();
$(targetID).append("<option value=''>카테고리</option>");
$(a).each(function(index, element) {
if (a[index].Value == value) {
$(targetID).append("<option value=\"" + a[index].Value + "\" selected>" + a[index].Text + "</option>");
}
else {
$(targetID).append("<option value=\"" + a[index].Value + "\">" + a[index].Text + "</option>");
}
});
}).error(function(a, b, c) {
alert('[네트워크 오류] \n오류가 발생하여 작업을 완료할 수 없습니다.');
});