Trying to replace an asset via replaceFile action in entry form UPDATE: We've resolved this one. Here is the working code:

&lt;form method="post" enctype="multipart/form-data" action="" accept-charset="UTF-8"&gt;
  &lt;input type="hidden" name="entryId" value="{{ entry.id }}"&gt;
  &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
  &lt;input type="hidden" name="sectionId" value="2"&gt;
  &lt;input type="hidden" name="enabled" value="1"&gt;

  &lt;input type="file" 
         name="replaceFile-{{ asset.id }}” 
         class="replace-file" 
         data-id="{{ asset.id }}" /&gt;


...and...

&lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; 
&lt;script&gt;
$(".replace-file").change(function() {
  var url = '/actions/assets/replaceFile',
      fileId = $(this).attr("data-id"),
      file = $("[name=replaceFile-"+fileId+"]")[0].files[0],
      formdata = new FormData();

  formdata.append("replaceFile", file);
  formdata.append("fileId", fileId);

  $("#output").html("Uploading...");

  $.ajax({
    url: url,
    type: 'POST',
    data:  formdata,
    cache: false,
    contentType: false,
    processData: false,
    success: function(data) {
      $("#output").html("Supposedly worked...");
    }
  });
});
&lt;/script&gt;
In short, you have the right idea, but you're not uploading any files with that JavaScript. All you're doing is sending a file id to a Craft action that expects an uploaded file as well.

You can find an insight on how to change your javascript to include file data as well here