DATABLE not displayed with IE6

DATABLE not displayed with IE6

pearly_030pearly_030 Posts: 42Questions: 0Answers: 0
edited July 2011 in General
Hi,

Remember, I don' speak engglis very well... ;-)

In FireFox my datatable woks but not in IE6. I don't find the solution.
Column's titles are OK but I have this message "Loading Data from server" (Processing).
Can you help me please ?
Thanks.
My code :
[code]
$(document).ready(function() {
$("#min").datepicker({
"dateFormat": "dd-mm-yy",
"monthNames": ["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Decembre"],
"dayNamesMin": ["Di","Lu","Ma","Me","Je","Ve","Sa"],
"showWeek": true,
"numberOfMonths": 2,
"weekHeader": "Sem"
});

$("#max").datepicker({
"dateFormat": "dd-mm-yy",
"monthNames": ["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Decembre"],
"dayNamesMin": ["Di","Lu","Ma","Me","Je","Ve","Sa"],
"showWeek": true,
"numberOfMonths": 2,
"weekHeader": "Sem"
});

var oTable1 = $("#reservees").dataTable({
/*"sDom": \'<"top">rt<"bottom"i>\',*/
/*"sDom": \'<"top"><"bottom">\',*/

//"sScrollY" : "100px",
"bFilter": false, /*search*/
"bPaginate": true, /* flèches de pagination */
"iDisplayLength": 8,
"bLengthChange": false, /* Affichage de l\'information "Show xx entries" */
"bInfo": false, /* Affichage de l\'information showing xx to yy of zz */
"bVisible": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "./server_processing.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
/* Add some extra data to the sender */
aoData.push( { "name": "min", "value": $("#min").val() } );
aoData.push( { "name": "max", "value": $("#max").val() } );
$.getJSON( sSource, aoData, function (json) {
/* Do whatever additional processing you want on the callback, then tell DataTables */
fnCallback(json)
} );
$.ajax( {
"dataType": "json",
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"fnInitComplete": function ( oSettings ) {
oSettings.oLanguage.sZeroRecords = "Aucune réservation trouvée. Veuillez consulter la liste des véhicules disponibles ci-dessous"
},
"aoColumns": [
/*id*/ { "bSortable": false, "bSearchable": false, "bVisible": false },
/*véhicule*/ { "bSortable": false, "bSearchable": false, "sWidth": "50px" },
/*qui*/ { "bSortable": false, "bSearchable": false, "sWidth": "100px" },
/*Date départ*/ { "bSortable": false, "bSearchable": false, "sWidth": "35px" },
/*Heure départ*/ { "bSortable": false, "bSearchable": false, "sWidth": "35px" },
/*Date retour*/ { "bSortable": false, "bSearchable": false, "sWidth": "35px" },
/*Heure retour*/ { "bSortable": false, "bSearchable": false, "sWidth": "35px" },
/*Site de départ*/ { "bSortable": false, "bSearchable": false, "sWidth": "100px" },
/*Destination*/ { "bSortable": false, "bSearchable": false, "sWidth": "100px" },
/*Nombre de passagers*/ { "bSortable": false, "bSearchable": false, "sWidth": "20px" }
]
});

$("#min").change( function() { oTable1.fnDraw(); } );
$("#max").change( function() { oTable1.fnDraw(); } );
$("#sitedepart").change( function() { oTable1.fnDraw(); } );
$("#destination").change( function() { oTable1.fnDraw(); } );


});
[/code]

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    IE should
    tell you the line number that offends it, this might help narrow it down. Even if it's not exact, it should be near the problem area.

    Is this your entire code? When I have issues with IE, it's often one of these two:
    1) a comma at the end of an array - IE will freak out while FF and Chrome will ignore it
    2) I've left some console.log() calls in the code. IE doesn't support a console object.
  • pearly_030pearly_030 Posts: 42Questions: 0Answers: 0
    fbas,

    With FireFox and IE9, it works correctly.
    With IE6, error.
    But I've more informations now. I tested JSON data in JSONLint and I've a parse error.
    JsonData :
    [code]
    {"sEcho":2,"iTotalRecords":"2","iTotalDisplayRecords":"1","aaData":[["1","Clio","Philippe VAILHE","25-07-2011","18:00:00","27-07-2011","18:00:00","Centre de Gestion Arles","DR Carqueiranne","2"]]}
    [/code]
    Parse error :
    [code]
    Parse error on line 1:
    { "sEcho": "2"
    ^
    Expecting '{', '['
    [/code]
    I don't find the error . Can you help me ?

    Thanks.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I don't have IE 6 to test.

    I also don't see an error.

    sorry. I'm sure someone else will help.
  • GregPGregP Posts: 500Questions: 10Answers: 0
    edited July 2011
    Strange. So you can 'see' a curly brace, but IE6 throws a parse error on it? Or in other words, the parse error IS on that curly brace, and it tells you it expects a curly brace?

    If so, that kind of weirdness sounds like an encoding issue. There might be an invisible character (from another encoding type), or something like that. Make sure all clients and server technology are speaking the same encoding type (utf-8 seems to be the obvious choice).

    Unfortunately, IE6 has miserable debugging tools, so it will be hard to see if it's using valid encoding types or not.

    My very unhelpful response leans more towards: why IE6? Nobody I know (not even Microsoft) is supporting IE6 anymore. We are in the habit of testing for IE6 because we have trained ourselves to be IE6 compliant, but unless you have a real and specific reason, I would just drop IE6 support. If you tell your client, "Since Microsoft itself does not support IE6, we no longer support IE6 either" or something like that.
  • pearly_030pearly_030 Posts: 42Questions: 0Answers: 0
    OK.
    I know Microsoft does not suppot IE6 !
    But My enterprise uses IE6 yet!
    Many Thanks blas & GregP
This discussion has been closed.