fnDestroy(); not wokring on ie ??
fnDestroy(); not wokring on ie ??
Hello, well i m using datatables with a server processing.
on my page i have a button, when i click on it the div with datatables refrech and re load a datatables, but he is working on firefox, but on ie 9 the datas are here, but the datables not working :
i m using this code to destroy the datatables and re populate it :
[code]
$(function(){
$('#source').change(function() {
varDateDebut = jQuery("#dateDebut").val();
varDateFin = jQuery("#dateFin").val();
varPoint1 = jQuery("#Point1").val();
varPoint2 = jQuery("#Point2").val();
console.log("varPoint1 = ", varPoint1 );
console.log("varDateDebut = ", varDateDebut);
console.log("varDateFin = ", varDateFin);
console.log("varPoint2 = ", varPoint2 );
$.ajax({
type: "POST",
url: "server_processing.php",
data: 'dateDebut='+varDateDebut+'&dateFin='+varDateFin+'&point1r='+varPoint1+'&point2='+varPoint2,
success:function(data){
//destruction de l'ancien datatbles
oTable.fnClearTable();
oTable.fnDestroy();
//création du nouveau datatables
$("#example").html(data);
oTable= $('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"sPaginationType": "full_numbers",
"oLanguage": { "sUrl": "js/dataTables.fr.txt" },
"oTableTools": {
"sSwfPath": "swf/copy_csv_xls_pdf.swf"
},
"aLengthMenu": [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]]
} );
}
});
});
});
[/code]
can u help me please to do working on ie.
thanks for all.
on my page i have a button, when i click on it the div with datatables refrech and re load a datatables, but he is working on firefox, but on ie 9 the datas are here, but the datables not working :
i m using this code to destroy the datatables and re populate it :
[code]
$(function(){
$('#source').change(function() {
varDateDebut = jQuery("#dateDebut").val();
varDateFin = jQuery("#dateFin").val();
varPoint1 = jQuery("#Point1").val();
varPoint2 = jQuery("#Point2").val();
console.log("varPoint1 = ", varPoint1 );
console.log("varDateDebut = ", varDateDebut);
console.log("varDateFin = ", varDateFin);
console.log("varPoint2 = ", varPoint2 );
$.ajax({
type: "POST",
url: "server_processing.php",
data: 'dateDebut='+varDateDebut+'&dateFin='+varDateFin+'&point1r='+varPoint1+'&point2='+varPoint2,
success:function(data){
//destruction de l'ancien datatbles
oTable.fnClearTable();
oTable.fnDestroy();
//création du nouveau datatables
$("#example").html(data);
oTable= $('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"sPaginationType": "full_numbers",
"oLanguage": { "sUrl": "js/dataTables.fr.txt" },
"oTableTools": {
"sSwfPath": "swf/copy_csv_xls_pdf.swf"
},
"aLengthMenu": [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]]
} );
}
});
});
});
[/code]
can u help me please to do working on ie.
thanks for all.
This discussion has been closed.
Replies
Allan
http://live.datatables.net/orupac/2/edit
that's works on firefox but on ie
what do u think the problem is please ?
http://live.datatables.net/orupac/3
and the problem is :
on firefox no problem, but on IE, the data are updated, but the datatables not working, he 's look like the fnDestroy() not work.
what do u think please
thanks to you
You are putting a table element with ID of #example inside another table element of ID #example. That is why it is not working - it is invalid HTML. If you just replace the table it works fine in all browsers:
http://live.datatables.net/orupac/4/edit
Allan
thanks, isee my error.
thanks:)