Hi everybody!!!!! I´m doing a webpage, I want that this webpage refreshly automatically. How can I do that with Ror Thanks!!! -- Posted via http://www.ruby-forum.com/. --000325558e162dc4a2047d355fc2 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --000325558e162dc4a2047d355fc2--
Guille San wrote:> Hi everybody!!!!! > I´m doing a webpage, I want that this webpage refreshly automatically. > How can I do that with RorMost people use Prototype or jQuery for this: http://api.prototypejs.org/ajax/ajax/periodicalupdater.html I''m sure there is also a Rails helper method wrapping this as well. Don''t remember what it is off-hand, but you can look that up in the Rails docs. -- Posted via http://www.ruby-forum.com/. --0015175cad8c4f90f4047d35945a Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015175cad8c4f90f4047d35945a--
Robert Walker wrote:> Guille San wrote: >> Hi everybody!!!!! >> I´m doing a webpage, I want that this webpage refreshly automatically. >> How can I do that with Ror > > Most people use Prototype or jQuery for this: > > http://api.prototypejs.org/ajax/ajax/periodicalupdater.html > > I''m sure there is also a Rails helper method wrapping this as well. > Don''t remember what it is off-hand, but you can look that up in the > Rails docs.Where I have to write the Ajax code??? -- Posted via http://www.ruby-forum.com/. --000325558e16cff016047d35c711 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --000325558e16cff016047d35c711--
Robert Walker wrote:> Guille San wrote: >> Hi everybody!!!!! >> I´m doing a webpage, I want that this webpage refreshly automatically. >> How can I do that with Ror > > Most people use Prototype or jQuery for this:Then they are probably foolish. You can use a meta tag refresh for this. No JavaScript needed. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --0015175cad8c4b1e5d047d35e883 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015175cad8c4b1e5d047d35e883--
Is there a particular reason you you can''t use the meta refresh tag? <meta content=''10'' http-equiv=''refresh'' /> -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote:> Robert Walker wrote: >> Guille San wrote: >>> Hi everybody!!!!! >>> I´m doing a webpage, I want that this webpage refreshly automatically. >>> How can I do that with Ror >> >> Most people use Prototype or jQuery for this: > > Then they are probably foolish. You can use a meta tag refresh for > this. No JavaScript needed.Yes, but who refreshes an entire page these days? -- Posted via http://www.ruby-forum.com/. --00032555412a7fed7c047d35eb6e Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --00032555412a7fed7c047d35eb6e--
Robert Walker wrote:> Marnen Laibow-Koser wrote: >> Robert Walker wrote: >>> Guille San wrote: >>>> Hi everybody!!!!! >>>> I´m doing a webpage, I want that this webpage refreshly automatically. >>>> How can I do that with Ror >>> >>> Most people use Prototype or jQuery for this: >> >> Then they are probably foolish. You can use a meta tag refresh for >> this. No JavaScript needed. > > Yes, but who refreshes an entire page these days?Okay, many sites, do. But, is that necessary in many of those cases? It''s more likely that a small bit of HTML needs to be added to the DOM. -- Posted via http://www.ruby-forum.com/. --0015175cad8c780fdf047d35f651 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015175cad8c780fdf047d35f651--
Robert Walker wrote:> Robert Walker wrote: >> Marnen Laibow-Koser wrote: >>> Robert Walker wrote: >>>> Guille San wrote: >>>>> Hi everybody!!!!! >>>>> I´m doing a webpage, I want that this webpage refreshly automatically. >>>>> How can I do that with Ror >>>> >>>> Most people use Prototype or jQuery for this: >>> >>> Then they are probably foolish. You can use a meta tag refresh for >>> this. No JavaScript needed. >> >> Yes, but who refreshes an entire page these days? > > Okay, many sites, do. But, is that necessary in many of those cases? > It''s more likely that a small bit of HTML needs to be added to the DOM.True, perhaps. But the OP didn''t say that that was the case... Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --0022158df84fe1d189047d36232d Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0022158df84fe1d189047d36232d--
Marnen Laibow-Koser wrote:> Robert Walker wrote: >> Robert Walker wrote: >> Okay, many sites, do. But, is that necessary in many of those cases? >> It''s more likely that a small bit of HTML needs to be added to the DOM. > > True, perhaps. But the OP didn''t say that that was the case...So you mean to say, "Turn off my brain and answer the exact question asked?" Even if that direct answer can lead to a bad user experience. I hate when I''m reading something on a web page, it refreshes and then have to go back and figure out where I left off. This is why I didn''t mention the meta refresh method. I''m fully aware of it, but I avoid it like I would the plague. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker wrote:> Marnen Laibow-Koser wrote: >> Robert Walker wrote: >>> Robert Walker wrote: >>> Okay, many sites, do. But, is that necessary in many of those cases? >>> It''s more likely that a small bit of HTML needs to be added to the DOM. >> >> True, perhaps. But the OP didn''t say that that was the case... > > So you mean to say, "Turn off my brain and answer the exact question > asked?" Even if that direct answer can lead to a bad user experience.No, I just mean that we don''t really know what the use case is.> > I hate when I''m reading something on a web page, it refreshes and then > have to go back and figure out where I left off.That would be annoying indeed.> This is why I didn''t > mention the meta refresh method. I''m fully aware of it, but I avoid it > like I would the plague.Whereas I''d use it in preference to the JS, because it''s more reliably guaranteed to work. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --0015175cad8c6ad60d047d371df7 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015175cad8c6ad60d047d371df7--
Marnen Laibow-Koser wrote:> Whereas I''d use it in preference to the JS, because it''s more reliably > guaranteed to work.I''ve given up the battle to make everything work without JavaScript. JavaScript is most certainly winning this fight. Hardly anyone disables it anymore so I think it safe enough to be relying on it. For those few holdouts that are disabling it, the refresh feature won''t work so they have to reload the page themselves. That still beats refreshing the entire page with no option to disable that "feature." -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker wrote:> Marnen Laibow-Koser wrote: >> Whereas I''d use it in preference to the JS, because it''s more reliably >> guaranteed to work. > > I''ve given up the battle to make everything work without JavaScript.I have not and will not, except in isolated circumstances.> JavaScript is most certainly winning this fight.It''s not an issue of winning. I''m perfectly happy to use JS where it''s necessary (with appropriate degradation), but I think it is silly, in most cases, to use it to duplicate HTML features.> Hardly anyone disables > it anymore so I think it safe enough to be relying on it.Now that''s just not true at all. If nothing else, lots of mobile browsers have deficient or nonexistent JS implementation -- even on smartphones like the BlackBerry Curve. (I speak from experience.)> For those few > holdouts that are disabling it, the refresh feature won''t work so they > have to reload the page themselves. That still beats refreshing the > entire page with no option to disable that "feature."Depends on the use case. And you *could* use an iframe to do something similar without JS, though that has its own compatibility issues. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --0015174c0d5c6844c6047d52580b Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015174c0d5c6844c6047d52580b--
Marnen Laibow-Koser wrote:> Robert Walker wrote: >> Marnen Laibow-Koser wrote: >>> Whereas I''d use it in preference to the JS, because it''s more reliably >>> guaranteed to work. >> >> I''ve given up the battle to make everything work without JavaScript. > > I have not and will not, except in isolated circumstances.Good for you. I commend you on your efforts.>> JavaScript is most certainly winning this fight. > > It''s not an issue of winning. I''m perfectly happy to use JS where it''s > necessary (with appropriate degradation), but I think it is silly, in > most cases, to use it to duplicate HTML features. > >> Hardly anyone disables >> it anymore so I think it safe enough to be relying on it. > > Now that''s just not true at all. If nothing else, lots of mobile > browsers have deficient or nonexistent JS implementation -- even on > smartphones like the BlackBerry Curve. (I speak from experience.)Such dumb devices would likely need their own dumbed down page anyway. I won''t base my pages targeted for "real" browsers based on dumb mobile devices.>> For those few >> holdouts that are disabling it, the refresh feature won''t work so they >> have to reload the page themselves. That still beats refreshing the >> entire page with no option to disable that "feature." > > Depends on the use case. And you *could* use an iframe to do something > similar without JS, though that has its own compatibility issues.True enough. However, I don''t like iframes much better than the meta refresh. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker wrote: [...]>> Now that''s just not true at all. If nothing else, lots of mobile >> browsers have deficient or nonexistent JS implementation -- even on >> smartphones like the BlackBerry Curve. (I speak from experience.) > > Such dumb devices would likely need their own dumbed down page anyway. I > won''t base my pages targeted for "real" browsers based on dumb mobile > devices.That''s sort of my point -- the BB Curve is *not* a dumb device. It has a Web browser that does a decent job with most HTML, and is definitely not targeted at mobile lo-fi sites. So when a device like this has minimal JS, I believe that means that JS does not have the penetration that you seem to think it does. (And 99% of lo-fi mobile sites aren''t worth using anyway.)> >>> For those few >>> holdouts that are disabling it, the refresh feature won''t work so they >>> have to reload the page themselves. That still beats refreshing the >>> entire page with no option to disable that "feature." >> >> Depends on the use case. And you *could* use an iframe to do something >> similar without JS, though that has its own compatibility issues. > > True enough. However, I don''t like iframes much better than the meta > refresh.I think I actually like them *less*. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. --002354530770094560047d53b4bb Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --002354530770094560047d53b4bb--
Hi Thanks a lot to the all people who answered the topic. I wanna to refresh only parts of the webpage, but at the moment I think that I´m so newbie for refresh only parts of the web. When I achieve refresh all the web, I´m going to started with the refresh of the parts I want to refresh. If anyone can give me some advices, I will be very grateful. Thanks -- Posted via http://www.ruby-forum.com/. --0022158df84fda086a047d70a725 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0022158df84fda086a047d70a725--
Guille San wrote:> Hi > Thanks a lot to the all people who answered the topic. > I wanna to refresh only parts of the webpage, but at the moment I think > that I´m so newbie for refresh only parts of the web. > When I achieve refresh all the web, I´m going to started with the > refresh of the parts I want to refresh.It''s really not nearly as hard as you might be thinking: # Call get_averages and put its results in ''avg'' every 10 seconds # Generates: # new PeriodicalExecuter(function() {new Ajax.Updater(''avg'', ''/grades/get_averages'', # {asynchronous:true, evalScripts:true})}, 10) periodically_call_remote(:url => { :action => ''get_averages'' }, :update => ''avg'') ''get_averages'' would be your controller action that would return the partial HTML that updates the contents of <div id=''avg''>...</div> every 10 seconds (by default). There are also options for inserting before or after depending on what you need. -- Posted via http://www.ruby-forum.com/. --0015174c0d5ca0bb2a047d7675f1 Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0015174c0d5ca0bb2a047d7675f1--
Hi everyone!!! I have some stupid questions.> It''s really not nearly as hard as you might be thinking: > > # Call get_averages and put its results in ''avg'' every 10 secondsget_average is a function that I have to create?? if it isn´t where(in the controller, in the view...) and how I call it??> # Generates: > # new PeriodicalExecuter(function() {new Ajax.Updater(''avg'', > ''/grades/get_averages'', > # {asynchronous:true, evalScripts:true})}, 10) > periodically_call_remote(:url => { :action => ''get_averages'' }, :update > => ''avg'')Where I have to generate that??> >Thanks a lot!!!PD: I know that I´m a little atupid, but it´s the first time when I done programming, I only know C code and it´s difficult for me adecuate mi mind. Thanks -- Posted via http://www.ruby-forum.com/. --0003255574aa22d68a047d85512a Content-Type: text/plain; charset=ISO-8859-1 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. --0003255574aa22d68a047d85512a--