render :update / page.replace_html problem

Hi there,

I have this ajax problem, I'm desparately trying to debug since 1 entire
day now:

The Controller includes:

What's calling the action? If you've passed an :update option to
link_to_remote (or remote_function etc...) then you must not use
render :update

Fred

Well, this is the form that calls the action (so there is no "remote_"
to the form or submit tag).

<% form_for (:cv, :url => '/user/cvs', :html => { :multipart => true })
do |f| %>
  <p>
    Upload A CV:
    <%= f.file_field :uploaded_data %>
    <%= hidden_field_tag 'applicationfile_id', @applicationfile.id %>
  </p>
  <p>
    <%= submit_tag 'Save' %>
  </p>
<% end %>

Everything gets uploaded correctly with it. But it doesn't update the
page (the DIV/partial), but instead just displays the javascript code...

Well, this is the form that calls the action (so there is no "remote_"
to the form or submit tag).

If it's just a regular post (ie not using remote_form_for) you can't
use render :update.

Fred

If you need this to be Ajaxified use remote_form_for instead, also check
out: http://www.caboo.se/articles/2007/4/2/ajax-file-upload, as you're
uploading file data.

Thanks for the clarification and your hints, guys!