On 6 Jan 2009, at 14:22, Shilo Ayalon 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
> <%= 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.
> --  
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to