Another approach to this might be to use the CSS Sprite technique. Use a sized DIV as your state *image*. Have one big background image with all the states in it at different X/Y positions. Have a different CSS class for each state, which changes the background-position property accordingly, exposing one slice of the larger image as needed. And in a callback to your PeriodicUpdater, change the className of your status DIV to the correct class for the given state.
The background image will load (and cache) once for the entire page (i.e.: very very fast). And then any updates will simply be to recalculate the top/left offset of that image. The browser should be very fast at this. Walter On Aug 29, 2007, at 1:02 PM, S wrote: > Apparently the Ajax image transition only looks nice when the images > are cached on the browser. I was being so careless. There is another > option to disable the cache on Firefox and when I used it, the image > seems to be updated every second as I wanted. But now the transition > is so visible. With that said, I'm not going to keep using > Ajax.PeriodicalUpdater. Instead I will use Ajax.Request and retrieve > the data one by one. Case closed. Thanks a lot everyone !!! --~--~---------~--~----~------------~-------~--~----~ 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 [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-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
