It should still be there. At this point in the application that div
has been updated at least twice but I don’t use replace anywhere.
Is there a way to pass data forward so that I could test with
rendering a partial? I would need to set the @report variable again
somehow for the partial.
The only other thing that immediately comes to mind is to validate your
html after the last successful update to make sure it didn’t break.
Since JS depends on a “mostly” valid dom, that could be it. If you are
using Firefox, the web developer tool bar has the ability to validate
local html and also the ability to view the “generated source” which
will show the source for the page after js has modified it.
For rendering as a partial, you can either directly access @report in
the partial, or decouple the partial by setting a local variable like
this:
render :update do |page|
page[:body].replace_html :partial => ‘a_partial’, :locals => {:report
=> @report}
end
This would set the local variable “report” in the partial to the value
of @report.
Hope this helps.
Glen wrote:
the page that has ‘body’ as it’s id. i.e.:
I’m trying to update a div after form submission, for some reason it