Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Problem with server-side processing

$
0
0
Hello,

I've got a problem when I'm trying to make my datatable with a JSON File...

See my HTML code below :


<html>
<head>
		<title>Extraction des users avec liste des droits</title>
		<link rel="stylesheet" type="text/css" href="complete.css">
		<link rel="stylesheet" type="text/css" href="infobulle.css">
		<script type="text/javascript" language="javascript" src="../media/js/jquery.js"></script>
		<script type="text/javascript" language="javascript" src="../media/js/jquery.dataTables.js"></script>
		<script type="text/javascript" language="javascript" src="../media/js/jquery.dataTables.columnFilter.js"></script>
		
		
		<script type="text/javascript">
			$(document).ready(function() {
				$('#tab_droits').dataTable( {
					"bProcessing": true,
					"bServerSide": true,
					"sAjaxSource": "recup_Users.php"
				} );
			} );
			
		</script>
</head>
<body>
		<div id="container">
	
		<table class="pretty" align="center" id="tab_droits">
		<thead><tr><th>LOGON</th>
				<th>NOM</th>
				<th>DATE MODIFICATION</th>
				<th>LIRECL</th></tr></thead>
				
	<tbody>
		<tr>
			<td colspan="4" class="dataTables_empty">Loading data from server</td>
		</tr>
	</tbody>
		<tfoot><tr><th>LOGON</th>
				<th>NOM</th>
				<th>DATE MODIFICATION</th>
				<th>LIRECL</th></tr></tfoot>
	</table>
</div>
</body>
</html>


There is nothing that change in the page... There is diplayed "Processing..." at the top of it, but no data to appears...

My Json file given by "recup_Users.php", seems correct to me also :


{"sEcho":0,"iTotalRecords":20,"iTotalDisplayRecords":20,"aaData":[["00460","LANG","050628","0"],["0587","CURELLI","051027","0"],["0968","VISCO","051027","0"],["1499","DERVAULT","051027","0"],["1698","KAMRAOUI","060209","0"],["1750","POULAIN","060411","0"],["2085","ANDRIEUX","051027","0"],["2237","BONNEHON","051027","0"],["2851","SUDRE","050812","0"],["3035","DAVID","050525","0"],["3045","SOULA","060308","0"],["3081","MAILLOCHON","050525","0"],["3167","ROBERT","051027","0"],["3489","COSTES","050628","0"],["4461","MARCON","050923","0"],["4462","BEAU","060209","0"],["4849","AUZEMARIE","051019","0"],["5242","CROUAU","060209","0"],["58F","GALEY","110420","0"],["6083","LAVIOLETTE","060120","0"]]}


I have no Javascript Error (I tried with a inexistant php file, and I've got an error, so the HTML see the php file)
I'm pretty sure I'm missing an obvious thing... But what ?

Thank you by advance for your help ! I'm looking for few hours...
And sorry for my english (I'm a french developper).

Viewing all articles
Browse latest Browse all 1816

Trending Articles