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]);
      }
function (loadedFrame, element) {
        var response, responseStr = loadedFrame.contentWindow.document.body.innerHTML;
        try {
          
          response = JSON.parse(responseStr);
        } catch (e) {
          response = responseStr;
        }

        
        element.siblings().remove();
        element.unwrap();

        uploading_file = false;

        
        settings.onComplete.apply(element, [response, settings.params]);
      }
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 ] ) ; }
/*
Internal handler that tries to parse the response
and clean up after ourselves.
/ * Internal handler that tries to parse the response and clean up after ourselves .