Hi everybody!
I have a problem with rjs. After submit the form, rjs not run. I would
like clear a text_field_tag. Here is my code:
--ActionController--
def add_post
@post = ChatPost.new(:ctext => params[:message])
@post.chat_room_id = session['selectedroomid']
@post.lang = session[:locale]
@post.save
end
--View--
<% form_remote_tag :url => {:action => 'add_post'} do %>
<%= text_field_tag "message", "", :size => 75%>
<%= submit_tag "Küldés" %>
<% end %>
--rjs - called: add_post.rjs--
page['message'].value = ''
I includ this:<%= javascript_include_tag :defaults %> in template.
I see in firebug that, the request is called and http status is 200, but
the field don't clear.
Please help me.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---