what could be a reason for my js to be displayed on the screen for a
second before it catches and does what it’s supposed to? I’ve had this
happen when I call page.reload inside render :update block…
<%= link_to_remote ‘reload’,
:update => ‘my_div’,
:url => {:action => ‘reload_page’} %>
def reload_page
respond_to do |format|
format.js do
render(:update) do |page|
page.reload
end
end
end
end
yup, rails newb.
On 6 Jan 2009, at 14:22, Shilo A. wrote:
what could be a reason for my js to be displayed on the screen for a
second before it catches and does what it’s supposed to? I’ve had this
happen when I call page.reload inside render :update block…
Don’t pass :update to link_to_remote if you’re using render :update
Fred
Frederick C. wrote:
On 6 Jan 2009, at 14:22, Shilo A. wrote:
what could be a reason for my js to be displayed on the screen for a
second before it catches and does what it’s supposed to? I’ve had this
happen when I call page.reload inside render :update block…
Don’t pass :update to link_to_remote if you’re using render :update
Fred
Right, that was the problem. Thanks.