code: function (loadedFrame, element) {
          var response, responseStr = loadedFrame.contentWindow.document.body.innerHTML;
          try {
            //response = $.parseJSON($.trim(responseStr));
            response = JSON.parse(responseStr);
          } catch (e) {
            response = responseStr;
          }
  
          // Tear-down the wrapper form
          element.siblings().remove();
          element.unwrap();
  
          uploading_file = false;
  
          // Pass back to the user
          settings.onComplete.apply(element, [response, settings.params]);
        }
docs: /*
  Internal handler that tries to parse the response
  and clean up after ourselves.