Situation: I have added a simple and slick effect when a link is clicked that fades out the page, then loads the link. The page then fades in. This effect was inspired by what is done at www.gucci.com. Problem: When the back button is used, the browser serves the page in it''s state when it was unloaded, which has the site #shell hidden. Basically, the site doesn''t show up. The javascript that fades the page in has been run from both an init() function before the </body>, and also on window.onload, with no luck. The events are not fired. What event can I observe that will fire after a page is presented from going ''back'', or is there a special way to force a redraw? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
David Dashifen Kees
2007-Jun-18 23:41 UTC
Re: Question: Forcing a Redraw When Using the Back Button
The only way I''ve solved this sort of problem is to store information in a session variable on the server which can be used to control the state of the web page. You can then, for example, run javascript at page load without running it within the window.onload function. That is, just put static javascript to be executed at the bottom of the page. - Dash - deletem3.com wrote:> Situation: > > I have added a simple and slick effect when a link is clicked that > fades out the page, then loads the link. The page then fades in. > This effect was inspired by what is done at www.gucci.com. > > > Problem: > > When the back button is used, the browser serves the page in it''s > state when it was unloaded, which has the site #shell hidden. > Basically, the site doesn''t show up. > > The javascript that fades the page in has been run from both an init() > function before the </body>, and also on window.onload, with no > luck. The events are not fired. > > What event can I observe that will fire after a page is presented from > going ''back'', or is there a special way to force a redraw? > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
K. Heutmaker
2007-Jun-19 00:27 UTC
Re: Question: Forcing a Redraw When Using the Back Button
I had the same issue with firefox. It had to do with firefox''s DOM caching function. The way to force firefox to not cache the DOM is to attach an onunload() event to the body. The onunload() can be an empty function, it just has to be there to force the DOM out of the cache. On Jun 18, 3:52 pm, "deletem3.com" <mat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Situation: > > I have added a simple and slick effect when a link is clicked that > fades out the page, then loads the link. The page then fades in. > This effect was inspired by what is done atwww.gucci.com. > > Problem: > > When the back button is used, the browser serves the page in it''s > state when it was unloaded, which has the site #shell hidden. > Basically, the site doesn''t show up. > > The javascript that fades the page in has been run from both an init() > function before the </body>, and also on window.onload, with no > luck. The events are not fired. > > What event can I observe that will fire after a page is presented from > going ''back'', or is there a special way to force a redraw?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
deletem3.com
2007-Jun-19 14:30 UTC
Re: Question: Forcing a Redraw When Using the Back Button
Thanks K. Heutmaker, That was exactly what I was looking for! - Matt On Jun 18, 7:27 pm, "K. Heutmaker" <kenh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I had the same issue with firefox. It had to do with firefox''s DOM > caching function. The way to force firefox to not cache the DOM is to > attach an onunload() event to the body. The onunload() can be an empty > function, it just has to be there to force the DOM out of the cache. > > On Jun 18, 3:52 pm, "deletem3.com" <mat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Situation: > > > I have added a simple and slick effect when a link is clicked that > > fades out the page, then loads the link. The page then fades in. > > This effect was inspired by what is done atwww.gucci.com. > > > Problem: > > > When the back button is used, the browser serves the page in it''s > > state when it was unloaded, which has the site #shell hidden. > > Basically, the site doesn''t show up. > > > The javascript that fades the page in has been run from both an init() > > function before the </body>, and also on window.onload, with no > > luck. The events are not fired. > > > What event can I observe that will fire after a page is presented from > > going ''back'', or is there a special way to force a redraw?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---