JQueryデータテーブルで私が抱えている問題の概要を次に示します。
a. 私のJSPページには次のものがあります:
<script type="text/javascript" src="../include/jquery.dataTables.js"></script>
<script>
$(document).ready(function() {
$('#snapTable').dataTable({
"iDisplayLength": 5,
"bPaginate": true
} );
} )
:
function checkSnapStatus() {
var url = "...."; // some JSP servlet return HTML table id = 'snapTable'. HTML has a div called progress_bar
$.get(url, function(xml) {
$('#statuscontent').html(xml); // Put the return HTML into div id='statuscontent' on the body element
var object = $('div.progress_bar'); // Get the div id=progress_bar elements =
$.each(object, function() {
//process some stuff
});
});
}
b. body.onload から checkSnapStatus 関数が呼び出されます。$.get 関数の後、レコード (多数) が表示されますが、ページネーションはありません。前へまたは次へのボタンが表示されません。