DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration

DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration

taufettaufet Posts: 1Questions: 0Answers: 0
edited April 2010 in General
hi sir... i need some help.

your Data Tables is Great. but i had some problem. please help me. i'm not good in jquery. still learning. i hope you can help my problem.

first i had include css and javascript and i tested with simple table. and it's work.

then i try use ajax and find error but still run... i will try to explain.
my javascript for ajax :
[code]
function dataTable(){


$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
} );
}
function menu_product()
{

var variabel = 'data/product_view.php';
request.open('get',variabel);
request.onreadystatechange = parse_menu_product;
request.send('');
}
function parse_menu_product()
{
if (request.readyState == 4)
{
var answer = request.responseText;
var data = answer;
document.getElementById('content').innerHTML = data;
}
dataTable(); //<<<=== if i don't use this, the table in product_view.php can't load the table perfectly.

}
[/code]
in index.html the table is show perfectly
my view (index.html) :
[code]

Intel




No.
Nama Barang
Type Barang
Harga




1
VGA 1
VGA
2,000,000





[/code]
product_view.php
[code]

<?php

?>



No.
Nama Barang
Type Barang
Harga




1
VGA 1
VGA
2,000,000






[/code]

when i click the link of "Intel" i want the dataTable can show in "content" div.
when i run the program. the datatable is shown. but before the dataTable shown, he shown the alert first. and the error is : DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration changes required.

can you help me please? tq.

Replies

  • akash2005akash2005 Posts: 1Questions: 0Answers: 0
    I faced the same problem. The problem was for me, somehow I called the dataTable initializing function/code twice. make sure you didn't make the same mistake. Cheers!
This discussion has been closed.