title: jquery file upload plugin: how to use callbacks?
body: <p>I am trying to implement the blue imp jquery file upload plugin from: <a href="https://github.com/blueimp/jQuery-File-Upload/" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload/</a> as often stated already the documentation is very detailed, but for me as beginner to jquery not really understandable.</p>
  
  <p>I think I have basically lets say almost zero experience with jquery, so if anyone could help me out or give me a him I would be very glad!</p>
  
  <p>I have tried to set up the basic implementation as it is in the wiki and saved following as index.html:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;jQuery File Upload Example&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;input id="fileupload" type="file" name="files[]" multiple&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/vendor/jquery.ui.widget.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.iframe-transport.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.fileupload.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  $(function () {
      $('#fileupload').fileupload({
          dataType: 'json',
          url: 'server/php/',
          done: function (e, data) {
              $.each(data.result, function (index, file) {
                  $('&lt;p/&gt;').text(file.name).appendTo(document.body);
              });
          }
      });
  });
  
  &lt;/script&gt;
  
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>What I wanted to do is show the images that have been uploaded on the same page. I thought I need to do this in the callback when upload is finished. However, I have no idea where to put the code...</p>
  
  <p>So, to find out where to put any code I simply tried to just get an alert-box and added this code | UPDATE: this works now:</p>
  
  <pre><code>$('#fileupload').bind('fileuploaddone', function (e, data) {alert("Message","Titel")});
  </code></pre>
  
  <p>I also tried to use simply (UPDATE: still does not work):</p>
  
  <pre><code>$('#fileupload').fileupload('disable');
  </code></pre>
  
  <p>as it is said in the wiki, but with no effect.</p>
  
  <p>Am I using the code in the wrong place? The code itself should be OK I guess...</p>
  
  <p>Thank in advance for any hint!</p>