Datatables works not as aspected
Datatables works not as aspected
johanja
Posts: 2Questions: 0Answers: 0
I followed the step by step instructions and data shows nicely on screen. But when i click on the column headers to adapt sorting nothing happens, also the arrows are not shown.
Pagination also doesn't work. Used default css.
Tried it in Firefox, safari, chrome on OSX, Mamp
Firebug doesn't give any errors...
How can I check/fix this?
Pagination also doesn't work. Used default css.
Tried it in Firefox, safari, chrome on OSX, Mamp
Firebug doesn't give any errors...
How can I check/fix this?
This discussion has been closed.
Replies
For the arrows that are not shown, that means that the images are not found. Use firebug and inspect the element containing the arrows and see if the images are loaded.
[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.DTD">
@import "/DataTables-1.9.1/media/css/demo_table.css";
<!-- !-->
$(document).ready(function(){
// activeer table formatting
$('#table_id').dataTable();
$("#zone-bar li em").click(function() {
// var hidden = $(this).parents("li").children("ul").is(":hidden");
$("#zone-bar>ul>li>ul").hide()
$(this).parents("li").children("ul").show();
});
});
function Toonklanten(data){
Object=document.getElementById("Klantenoverzicht");
Object.innerHTML=data;
}
Gebruiker:
Nieuwe gebruiker
Afmelden
Zoeken
Navigatie
Klanten
Leveranciers
©2012 IT-Factory bvba
[/code]
klanten.php file:
[code]
<?php
//$q=$_GET["q"];
// Globale variabelen
$db_host = 'localhost';
$db_name = '';
$db_user = '';
$db_pw = '';
$con = mysql_connect('localhost',$db_user,$db_pw);
if (!$con) {
die('Probleem met database verbinding! (klanten.php): ' . mysql_error());
}
mysql_select_db($db_name,$con);
//$query="SELECT * FROM Klanten LEFT JOIN [Postcode Plaatsnaam] ON Klanten.klantpostcode = [Postcode Plaatsnaam].ID";
$query="SELECT * FROM Klanten";
$result = mysql_query($query);
echo "
Naam
Adres
Postcode
Plaats
Telefoon
Fax
Contact
BTW-nummer
PrijsCat.
DropKost
VarKost
TransKost
Korting
IC
";
while ($row = mysql_fetch_array($result)) {
echo "";
echo "" . $row['KlantNaam'] . "";
echo "" . $row['KlantAdres'] . "";
echo "" . $row['KlantPostcode'] . "";
echo "" . $row['KlantTelefoon'] . "";
echo "" . $row['KlantFax'] . "";
echo "" . $row['KlantContactPersoon'] . "";
echo "" . $row['KlantBTW'] . "";
echo "" . $row['KlantPrijsCategorie'] . "";
echo "" . $row['KlantDropkost'] . "";
echo "" . $row['KlantVarKost'] . "";
echo "" . $row['KlantTransportKost'] . "";
echo "" . $row['KlantGebruikKortingSchema'] . "";
echo "" . $row['KlantIC'] . "";
echo "";
}
echo "
";
mysql_close($con);
?>
[/code]
Allan