no scrolling
no scrolling
r0ckteacher
Posts: 2Questions: 1Answers: 0
This code is almost identical to the scrolling example combined with the ajax data source example. The datatable works as pageable, but it should scroll. Any ideas?
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>temp.html</title>
<link rel="stylesheet" type="text/css"
href="https://cdn.datatables.net/v/dt/jq-2.2.4/dt-1.10.13/sc-1.4.2/se-1.2.0/datatables.min.css" />
<script type="text/javascript"
src="https://cdn.datatables.net/v/dt/jq-2.2.4/dt-1.10.13/sc-1.4.2/se-1.2.0/datatables.min.js"></script>
</head>
<body>
<table id="keyoffs" class="display" width="100%" cellspacing="0">
<thead>
<tr>
<th>Applied</th>
<th>Charge #</th>
</tr>
</thead>
</table>
<script type="text/javascript">
$(document).ready(function() {
$('#keyoffs')
.DataTable(
{
"ajax" : {
"url" : "http://localhost:8080/PracSecure/KeyoffTablePopulator?tableName=keyoffs&key=1234",
"dataSrc" : "data",
"scrollY" : "200px",
"scrollCollapse" : true,
"paging" : false
}
});
});
</script>
</body>
</html>
This discussion has been closed.
Answers
I just figured it out. misplaced curly brackets.