tags:

views:

24

answers:

1

I am trying to find an AJAX File uploader to use, I think i may go with this on below:

http://valums.com/ajax-upload/

The issue i am having is that i cannot figure out how to make a jQuery AJAX call when the uploader has finished uploading the file. Is this possible? I don't have to necessarily use this specific uploader.

+2  A: 

This ajax uploader has an onComplete event callback, so you'll just have to pass your jQuery ajax call to it. Something like this:

var uploader = new qq.FileUploader({
    element: document.getElementById('file-uploader'),
    action: '/server/upload',
    onComplete: function(id, fileName, responseJSON) {
      // Here comes your jQuery ajax call
      $.ajax({
        url: 'ajax/post_process.php',
        success: function(data) {
           // ...
        }
      });
    }
});
András Szepesházi
very cool, thank you. i saw that but I'm still learning jquery, javascript and ajax. thanks again.
mcbeav