draw not working, but no error in my console mozilla

draw not working, but no error in my console mozilla

deny22deny22 Posts: 3Questions: 2Answers: 0

i want to ask why my code to refresh mt table not work

here is the debugger
http://debug.datatables.net/ihuvod

here is the ajax code

$(function() {
var table = $('#tab-per').DataTable();
var form = document.getElementById("postme");
$('form#postme').on('submit', function(e) {
$.post('cnp.php?hal=103.sv', $(this).serialize(), function (data) {
alert('Data perusahaan sukses disimpan !');
table.draw(false);
form.reset();
// This is executed when the call to mail.php was succesful.
// 'data' contains the response from the request
}).error(function() {
alert('Mohon maaf ada kesalahan')
// This is executed when the call to mail.php failed.
});
e.preventDefault();

            });
});

and this the save php

include "../conn/koneksi.php";
$getlast = mssql_query("SELECT MAX(kode) FROM company");
$fetch = mssql_fetch_array($getlast);
$exp = explode("-", $fetch[0]);

$idper = "P-".sprintf('%04d',$exp[1]+1);
$nama = $_POST['nama'];
$alamat = $_POST['alamat'];
$kota = $_POST['kota'];
$kodepos = $_POST['kodepos'];
$telp = $_POST['telp'];
$fax = $_POST['fax'];
$kontak = $_POST['kontak'];
$jabatan = $_POST['jabatan'];
$hp = $_POST['hp'];
$type = $_POST['tipe'];
$status = $_POST['status'];
$email = $_POST['email'];


$q = mssql_query("INSERT INTO company (kode,nama,alamat,kota,kodepos,telp,fax,kontak,jabatan,hp,type,sts,email)
                  VALUES('$idper','$nama','$alamat','$kota','$kodepos','$telp','$fax','$kontak','$jabatan','$hp','$type','$status','$email')")or die();

thanks sorry for my bad english

This discussion has been closed.