dimanche 3 juillet 2016

$.getJSON not work on internet explorer


I use the library jQueryFileUpload for upload some file in a form. If their is a mistake in the form at the validation i reload the page. But i don't want to delete the file already upload by the user so in my javascript on the load of the page i have this line :

$.getJSON('${base_url}jsp/site/plugins/asynchronousupload/DoRemoveFile.jsp', jsonData,
                function(json) {
                    dump(json,'body');
                    formDisplayUploadedFiles${fieldname}(json, null, '${checkBoxPrefix}');
                }
            );

The function 'formDisplayUploadedFiles' will permit to reload the file. On all the browser expect Internet explorer if i already upload a file dump(json,'body) will send me this object :

object(6): {
   success:  string(7): "success"
   files:  object(3): {
      name:  string(47): "myFile.pdf"
      preview:  string(0): ""
      size:  number: 2313528
   }
   fileCount:  number: 1
   field_name:  string(23): "fieldName"
}

But on internet explorer it will send me this :

object(3): {
   success:  string(7): "success"
   fileCount:  number: 0
   field_name:  string(23): "fieldName"
}

But if my console is open it's will work on Internet Explorer also ... why?


Aucun commentaire:

Enregistrer un commentaire