如何在ajax上传完成后刷新当前页面

I'm working on JS Ever ajax multiple image uploader. It works really great but one thing. I need the working page reload after all file finish upload. Yes, there's a function to do something after a file uploaded like : success, complete or done. But these callback is per file. It's mean if I add a reload function to it. The page will be reloaded right after the first file is finished upload.

I've tried.

complete:function(file,xhr){alert("ok")}

It works! But it's 3 ok popups since I uploaded 3 files. I need only one "OK" alert after the 3rd file is upload. Please suggest.

$('#uploader').JSAjaxFileUploader({
    uploadUrl: 'upload.php',
    complete: function (file, xhr) {
        $(alert("ok"));
    }
});

This is the DEMO.

查看全部
dongxingdu9594
dongxingdu9594
2014/12/28 15:07
  • php
  • ajax
  • javascript
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复