Download AjaxForm file in Firefox 4

<form action="upload.aspx" enctype="multipart/form-data" id="ajaxUploadForm" method="post"> <input type="file" name="fileBase" id="fileBase"><input type="submit" value="send" /> </form> $( "#ajaxUploadForm" ).ajaxForm( { iframe: "true",cache: false, success: function ( response ) { var msg = $.parseJSON( $( response ).val() ); alert ( msg.status); } }} ); 

When I try to submit an ajax form, I have an error (only in Firefox 4):

"uncaught exception: [Exception ..." The component returned a failure code: 0x805e0006 [nsIDOMHTMLFormElement.submit] "nsresult:" 0x805e0006 () "location:" JS frame :: http: //localhost/Scripts/jquery/jquery.form. js :: doSubmit :: line 295 "data: no] Line 0"

I am using jquery 1.5.1 and jquery.from 2.67

thanks for any suggestion

+4
source share
3 answers

I recently encountered a similar error when trying to send an ajax request using jquery. It worked on chrome, IE, Opera, but did not work on FF. After several hours spent debugging, it turned out that AdBlock Plus was blocking my request. Therefore, if you have not solved the problem, try disabling AdBlock.

0
source

You cannot upload files using ajax, for this you need to either use iframe or flash.

-2
source

Source: https://habr.com/ru/post/1346953/


All Articles