Initial Beginning with mysql + ajax + datatables
Initial Beginning with mysql + ajax + datatables
cybermailer
Posts: 1Questions: 1Answers: 0
Hi everybody,
i want to learn how to use datatables.
But everytime i'm starting i'm getting an json error. (table id = example invalid json ....)
What have i done:
- integrate the resources:
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
<!-- link jquery ui resources -->
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<!-- link bootstrap resources -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- link calendar resources -->
<link rel="stylesheet" type="text/css" href="../css/tcal.css" />
<script type="text/javascript" src="../js/tcal.js"></script>
<!-- link datatables resources -->
<script src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.2/css/jquery.dataTables.css" />
create the mysql table datatables_demo
third put code into htmls body
Firmenbezeichnung | Vorname | Nachname | Telefon | Bemerkung | |
---|---|---|---|---|---|
Firmenbezeichnung | Vorname | Nachname | Telefon | Bemerkung |
<script>
$(document).ready(function() {
$('#example').dataTable( {
"processing": true,
"serverSide": true,
"ajax": "customer/customer_server_processing_simple.php"
} );
} );
</script>
- adopt server configuration information
customer_server_processing_simple.php
- Getting the error Error. The Framework without data is correctly shown.
Also question: do i need this file to work correctly: require( 'ssp.class.php' ); ?
First i want to get the simple example running...
THX in advance!
This discussion has been closed.