format json

format json

caroline.roethlisbergercaroline.roethlisberger Posts: 2Questions: 1Answers: 0

Bonjour,

Lorsque je lance mon application mon datatable ne se charge pas sous firefox et IE11. Il reste sur chargement en cours...
Le message suivant apparait :

DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error

Pourtant j'ai testé le contenu de la réponse json et tout va bien :

{ "sEcho": "1", "iTotalRecords": "80", "iTotalDisplayRecords": "19", "aaData": [ [ "137", "198", "CF000115", "", "UCANSS", "09-10-2015", "23-10-2015", "09-10-2015", "En reception", "299", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=137&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "136", "128", "CF000114", "", "AASI", "07-10-2015", "22-10-2015", "09-10-2015", "En reception", "25", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=136&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "135", "49", "CF000113", "Anne Daver", "PAPETERIE MODERNE", "07-10-2015", "21-10-2015", "14-10-2015", "En cours", "1051", "Non", " <img class='editCmde' src='../img/admin/edit.gif'/> <img class='delCmde' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/delete.gif' title='Supprimer la commande' />" ],[ "134", "140", "CF000112", "", "A CONCEPT", "07-10-2015", "15-10-2015", "07-10-2015", "En cours", "2059", "Non", " <img class='editCmde' src='../img/admin/edit.gif'/> <img class='delCmde' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/delete.gif' title='Supprimer la commande' />" ],[ "133", "307", "CF000111", "", "ADEMO", "06-10-2015", "14-10-2015", "07-10-2015", "En reception", "33", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=133&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "132", "73", "CF000110", "caro", "APAVE ST QUENTIN EN YVELINES", "05-10-2015", "14-10-2015", "12-10-2015", "En reception", "576", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=132&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "131", "142", "CF000109", "", "IRON MOUNTAIN", "10-09-2015", "10-09-2015", "05-10-2015", "En reception", "336", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=131&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "130", "45", "CF000108", "", "TECHNIC'ENVELOPPES", "17-10-2014", "17-10-2014", "05-10-2015", "En reception", "2289", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=130&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "129", "209", "CF000107", "", "MEDIATRANSPORT", "17-10-2014", "17-10-2014", "05-10-2015", "En reception", "0", "Non", " <img class='recptCmde' src='../img/admin/products.gif' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=129&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='closeCmde' src='../img/admin/enabled.gif' title='Cloturer la commande' />" ],[ "128", "236", "CF000106", "", "APPEL DE PRIX", "17-10-2014", "17-10-2014", "05-10-2015", "En attente", "118", "Non", " <img class='recptCmde' src='../img/admin/products.gif' title='Receptionner la commande' /> <a href='../modules/ILLICOPRESTA_cmdeFournisseur/scripts/viewPDF.php?cmde=128&type=bdc' target='blank'> <img class='printBDC' src='../modules/ILLICOPRESTA_cmdeFournisseur/img/bdc.gif' title='Imprimer le bon de commande' /></a> <img class='cancelCmde' src='../img/admin/disabled.gif' title='Annuler la commande' />" ] ] }

PHP 5.1.6
jquery-1.6.4.min.js

Avez vous une idée ?

Merci d'avance

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Can you link to the page showing the issue, or use the DataTables debugger please.

    The error you are seeing means that there is something in the Ajax return that is making the data invalid JSON. Whatever that is does not appear to be shown in your above JSON, so we would need a link to the page or the debugger trace (as noted in the forum rules).

    Allan

  • caroline.roethlisbergercaroline.roethlisberger Posts: 2Questions: 1Answers: 0

    Bonjour,

    je ne peux pas vous faire de lien vers ma page et j'ai essayé d'utiliser le datatables debugger mais le message
    DataTables debug bookmarklets
    DataTables is not available on this page.
    s'affiche quand je clique sur le bouton "datatables debug" !!!
    Je suis sous IE8

    Caroline

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Salut Caroline,

    Je crains que, sans soit un lien vers la page ou une trace du débogueur il n'y a aucune aide que je peux offrir. Pardon.

    Allan

    en: I'm afraid that without either a link to the page or a debugger trace there is no help that I can offer. Sorry.

This discussion has been closed.