Displaying 3 results from an estimated 3 matches for "replace_htm".
Did you mean:
replace_html
2006 Jul 21
0
Ajax page.replace_html model validation errors
...rm and which
in case it can''t save, it renders a rjs template, that replaces the
html in the view with the _form
so as to present it to the user again along with the associated error
messages from the failed validation.
The rjs template called ''fixer'' that does: page.replace_htm
The problem:
If the action ''create'' can''t save because of an error on the
validation process, say validates_presence
detects an empty field, then the ''create'' action will render the
''fixer'' rjs which has a page.replace_html that r...
2006 Jul 24
0
Ajax page.replace_html model validation render partial errors
..._form and which
in case it can''t save, it renders a rjs template, that replaces the
html in the view with the _form
so as to present it to the user again along with the associated error
messages from the failed validation.
The rjs template called ''fixer'' that does: page.replace_htm
The problem:
If the action ''create'' can''t save because of an error on the
validation process, say validates_presence
detects an empty field, then the ''create'' action will render the
''fixer'' rjs which has a page.replace_html that repla...
2010 Jul 27
7
trouble with remote_form_for & html_update
...the
comment partial.
From comments_controller
def create
@story = Story.find(params[:story_id])
@story.comments.create params[:comment]
flash[:notice] = "Thank you for commenting"
end
This is create.rjs
<script>
aremark = page.getElementById("aremark")
page.replace_html(''aremark'', :partial => "content")
</script>
This was working then didn''t. I don''t know what I did to break it.
Can anybody see where I am going wrong?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are s...