jquery的导航页面13(nodeDocPage.jsp续)

else {
            $('#pageBarBottom').pagination({
                total:doc_total,
                onSelectPage:function(pageNumber, pageSize){
                    $(this).pagination('loading');
                   
                    $("#product_doc_table_body").html("");
                    $("#product_doc_table_body").append("<tr><td colspan='4'><img width='12' height='12' src='/support/images/NavigationBar/loading.gif'> loading...</td></tr>");
                   
                    $.getJSON(
                        root_url + "pages/navigation/gotoKBNavi.do?actionFlag=getCurPageDocs&d=" + (new Date()).getTime() + "&colID=<%=colID%>&"
                         + $("#selectDictForm").serialize()+ "&itemId="+$(node).attr("id")+"&level_id="+$(node).attr("level")
                         +"&pageIndex="+pageNumber+"&pageSize="+pageSize,
                         function(data) {updatePageDocs(node, data, false);});
                    $("#pageSize").val(pageSize);
                    $(this).pagination('loaded');
                     //改变上面的分页bar
                    $('#pageBarTop').pagination({
                        pageNumber:pageNumber,
                        pageSize:pageSize
                    });
                }
            });
            $('#pageBarTop').pagination({
                total:doc_total,
                onSelectPage:function(pageNumber, pageSize){
                    $(this).pagination('loading');
                   
                    $("#product_doc_table_body").html("");
                    $("#product_doc_table_body").append("<tr><td colspan='4'><img width='12' height='12' src='/support/images/NavigationBar/loading.gif'> loading...</td></tr>");
                   
                    $.getJSON(
                        root_url + "pages/navigation/gotoKBNavi.do?actionFlag=getCurPageDocs&d=" + (new Date()).getTime() + "&colID=<%=colID%>&"
                         + $("#selectDictForm").serialize()+ "&itemId="+$(node).attr("id")+"&level_id="+$(node).attr("level")
                         +"&pageIndex="+pageNumber+"&pageSize="+pageSize,
                         function(data) {updatePageDocs(node, data, false);});
                    $("#pageSize").val(pageSize);
                    $(this).pagination('loaded');
                    //改变下面的分页bar
                    $('#pageBarBottom').pagination({
                        pageNumber:pageNumber,
                        pageSize:pageSize
                    });
                }
            });
        }
    }
   
    function updatePageDocs(node, data, pageIndexReset) {
if (data != null && data.result_code == "1") {
//处理正常
showDocs(node, data.jsonData, pageIndexReset);
} else if (data != null && data.result_code == "2") {
//没有权限
location.href = "/support/forwardLogin.do?redirect=" + encodeURIComponent(location.href);
return false;
} else {
//处理异常
var exception = '<bean:message key="sys.err.unknowerror"/>';
$("#product_doc_table_body").empty();
$("#product_doc_table_body").append("<tr><td colspan=\"6\">" + exception + "</td></tr>");
return false;
}
    }

你可能感兴趣的:(html,jquery,jsp)