fnDestroy(); not wokring on ie ??

fnDestroy(); not wokring on ie ??

IssaIssa Posts: 16Questions: 3Answers: 0
edited March 2013 in General
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.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Link to a test case please: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • IssaIssa Posts: 16Questions: 3Answers: 0
    edited March 2013
    ok this the code test i used :

    http://live.datatables.net/orupac/2/edit

    that's works on firefox but on ie

    what do u think the problem is please ?
  • IssaIssa Posts: 16Questions: 3Answers: 0
    i have update the code and added the good link :


    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
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    > $("#example").html(data);

    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
  • IssaIssa Posts: 16Questions: 3Answers: 0
    hello,

    thanks, isee my error.

    thanks:)
This discussion has been closed.