3
I have tried to make an upload system with AJAX and works perfectly in Chrome, however it does not work in firefox. I used the function $.ajax()
jquery. Have any suggestions of what might be?
I have a normal form that requires a file and AJAX makes a PDF Viewer 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.
Go to Firebug and see if there’s any other error in javascript that might disturb this.
– Edson Horacio Junior
I tried firebug, but I still couldn’t find anything significant. Only a NS_ERROR_FAILUTE that is an AJAX error common in those who use Firefox and a _getLoginDataFromParent: A form origin is required which is possibly from a PDF Viewer that I am using.
– SecZeus
You will see that the problem has nothing to do with ajax, but with the PDF (or its viewer). Try testing with other content and see if the problem remains.
– Bacco
@Bacco tb I think.
– Sam
https://dxr.mozilla.org/mozilla-beta/source/toolkit/components/passwordmgr/LoginManagerContent.jsm line 294?
– Leandro Angelo
In all versions or only the one you have installed?
– Leandro Angelo
Read it here: https://stackoverflow.com/questions/9622901/how-to-upload-a-file-using-jquery-ajax-and-formdata/9622978#9622978. I think it might help.
– Erika_Mac
It depends a lot on several factors, please update the question by adding more information like: Jquery version, The access domain is the same (CORS), browser version, Answer data, Answer encoding...
– edson alves