Link to home
Start Free TrialLog in
Avatar of Arthur Wang
Arthur WangFlag for United States of America

asked on

Firefox got stuck on file uploading page

I currently have a very weird thing happened on the file uploading page between safari and firefox.

the web page let a user upload multiple images to the server, after the user choose the files he wants to upload, and click on the upload button, all the files will be uploaded to the server by using Jquery. both safari and firefox have no problem on this process so far. I can see the uploading process is 100% done.

User generated image
The problem is------ the Safari browser allow the user to click on the button NEXT to move forward to the next page, but the firefox (version 47.01) does not.

The uploading function is from this link:

http://plugins.krajee.com/file-advanced-usage-demo

the example 11 from the link above is what I am using.

"With release v4.0.0, the plugin now supports AJAX based uploads using HTML 5 FormData and XHR2 protocol, which is supported in most modern browsers." is copied from this page:

http://plugins.krajee.com/file-input/demo

doesn't Firefox 47.01 support AJAX?

Below are my configuration :


The action snippet  inside my struts.xml is:
 
       
         <action name="doUpload" class="xxx.eblast.report.FileUploadAction"  method="execute"> 
          <result type="json" />
        </action>

Open in new window


the form to upload file is:
       <div class="container kv-main">

               <form enctype="multipart/form-data">
                 <div class="form-group">
                    <input id="file-10" name=upload type="file" multiple class="file-loading">
                </div> 
               </form>

        </div>

Open in new window


 <script>
$("#file-10").fileinput({
    uploadUrl: "doUpload", 
    allowedFileTypes: ["image", "video"],
    allowedFileExtensions: ["png", "jpeg", "jpg", "gif"],
    uploadAsync: false,
    maxFileCount: 10,
    uploadClass: "btn btn-success",
    uploadLabel: "Upload",
    uploadIcon: "<i class=\"glyphicon glyphicon-upload\"></i> "
    
});
</script> 

Open in new window


The snippet for the next button is:
      
<div class="container clearfix"  > 
	        <div class="row-fluid" >   
   
		    <s:url action="composeEmail" var="urlTag" ></s:url>
		    <button type="button" class="btn btn-default pull-right"><s:a href="%{urlTag}" > NEXT </s:a></button>

 	    </div><!-- row fluid -->
    </div> <!-- container -->

Open in new window



the action is:

      
<action name="composeEmail">
          <result>/composeEmail.jsp</result>
          </action>

Open in new window

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

doesn't Firefox 47.01 support AJAX?
Of course it does or the upload wouldn't happen.  Your 'Next' button is not part of the AJAX function, it's part of your code that you added.
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Arthur Wang

ASKER

After more testing on the "NEXT" button, I finally decide to use form button to replace the button link such that it can be working on both Safari and Firefox browser.