Topic: Problem with 'responds_to_parent'

Hello,


I have installed 'responds_to_parent' plugin.

And i have an alert message error :
'RJS error :'
'TypeError: Element.update is not a function'

please help me, I don't know what to do. I have been working on that problem all saturday.
I had removed and reinstalled the plugin.

Please Help.




Controller :

class TestController < ApplicationController
  def index
  end
   
  def action1
    @f = Fichier.create params[:f]
    responds_to_parent do
     render(:update){ |page| 
       page.replace_html "message", "File save !"
      }   
    end
  end
end

View :
<div id="message">Message : </div>
<%= form_tag ({:action=>"action1"}, :multipart=>true, :target=>"flag_frame", :id=>"formulaire") %>
    file : <%= file_field :f, :fichier %><br/><br/>
    <%= submit_tag "valider" %>
<%= end_form_tag %>
<iframe>

The model :

class Fichier < ActiveRecord::Base
  REP_STOCKAGE = "public/images/"
 
  def validate
    if self.nom_fichier.nil? or self.nom_fichier == REP_STOCKAGE
      errors.add :fichier, "Indiquer un nom de fichier"
    end
  end
 
  def fichier=(f)
    self.nom_fichier = REP_STOCKAGE + f.original_filename
    self.type_fichier = f.content_type
   
    unless f.original_filename == ""
      f1 = File.new(self.nom_fichier, "wb")
      f1.write(f.read)
      f1.close
    end
  end
 
end

Re: Problem with 'responds_to_parent'

While i was written my post I find the solution.

I forgot to include
<%= javascript_include_tag :defaults %>
in the head of my layout

Thank you