weixin_33697898 2015-11-13 10:42 采纳率: 0%
浏览 22

Ajax调用的结果

I used this kind of Ajax call found on this site. The purpose is to upload multiple files without refreshing the page.

<script type="text/javascript">
$(document).ready(function()
{
    new multiple_file_uploader
    ({      
        form_id: "fileUpload", 
        autoSubmit: true,
        server_url: "../ajax/myfile.php" // PHP file for uploading the browsed files
    });
});
</script>

And I try to store the result of this ajax call. I do not really know how to proceed.

I am used to work with this kind of syntax

$.post("../ajax/myfile.php",
{
  var1: "var1",
  var2: "var2",
},
function(data,status)
{ 
  var result = data;
  //Use result as you wish
});

Which is more understandable ...

I tried to convert the first ajax to the second. But it make the whole page failing. I am pretty sure that the result can be easily stored without changing everything

  • 写回答

1条回答 默认 最新

  • Memor.の 2015-11-13 10:58
    关注

    I have check the library. It seams ity doesnt provide any callback option.

    Basically, you cant store result.

    评论

报告相同问题?