I have update.rjs
if @category.errors.length > 0
page.replace_html ''flash_box'', error_messages_for(:category)
page.show ''flash_box''
else
page.hide ''flash_box''
page.replace_html @category.dom_id, :partial => "category", :locals
=> {
:category => @category}
page.visual_effect :highlight, @category.dom_id, :startcolor =>
"''#fff000''"
page.replace_html ''form_add_new'', :partial =>
"index"
page["category_form"].reset
end
So basicly i am updating a div with edited category(works), then I try
to replace the form from edit form to add new category form(works) but i
cannot clear
this form, it still has values from my edit form even though i am making
a .reset.
This method works on my create.rjs
i dont have errors in firebug.
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---