How to add a javascript function after uploading file
You could just bind something to the jQuery ajax success event on the page where your form is displayed.

You can bind ajaxSuccess to any jQuery object, try something like this if you're experimenting:

&lt;script&gt;
  (function ($) {
    $(function () {
      jQueryObject = $({});
      jQueryObject.ajaxSuccess(function(event, XMLHttpRequest, ajaxOptions) {
        /* do something whenever an ajax call is successful */
      });
    });
  })(jQuery);
&lt;/script&gt;