AJAX request works on all browsers except Firefox

3

I have tried to make an AJAX upload system and it works perfectly in Chrome, however it does not work in firefox. I used the $.ajax() function of JQuery. Do you have any suggestions whatsoever?

I have a normal form that requires a file and AJAX causes a PDF Viewer to appear, like:

$.ajax({
  url: 'url.php',
  method: 'POST',
  data: dados,
  success: function(data) {
    $("#mensagem").append(data);
}
})

And I do not understand why firefox does not work.

    
asked by anonymous 02.10.2018 / 22:19

1 answer

0

Use the following code, where I edited "method" to "type":

$.ajax({
        type: "POST",
        url: "url.php",
        data: dados,
        success: function(data){
                                $("#mensagem").append(data);  
                 }
});
    
09.10.2018 / 00:38