I have a simple link_to_remote that refresh a div. I just want to know
if it’s possible to interrupt the div’s refresh inside :action to
perform a complete reload of the page, outside of the div
Actually, I havea a new page, but loaded inside the “:update” div.
def theaction
count -= 1
if count > 0
redirect_to :action “main” # to refresh all the page
else
render :partial => “…” # refresh inside div stuff
end
end
update count here, you’ll probably need to use the session
end
theaction.rjs:
if @session[:count] > 0
page.redirect_to :action => :main
else
page.replace_html ‘div’, :partial => “…”
end
Cheers, -Jonny.
oo00oo wrote:
Hello,
I have a simple link_to_remote that refresh a div. I just want to know
if it’s possible to interrupt the div’s refresh inside :action to
perform a complete reload of the page, outside of the div
Actually, I havea a new page, but loaded inside the “:update” div.
def theaction
count -= 1
if count > 0
redirect_to :action “main” # to refresh all the page
else
render :partial => “…” # refresh inside div stuff
end
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.