Hello all, I''ve tried to use an iframe as in new Ajax.PeriodicalUpdater("iframe1", "Ajax1.jsp", {}); but it doesn''t work (rendering blank space). I''ve use div and span as container, both worked magic. Is this a known problem? I''ve searched the discussion with these terms, and was surprised no one raised the issue before. Does anyone know a fix? I need to use iframe to keep a consistent look throughout the site. Many thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
are you trying to get the iframe to load content from a different domain? On Tue, Apr 29, 2008 at 3:41 PM, Debbie <liu9471-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello all, > > I''ve tried to use an iframe as in > new Ajax.PeriodicalUpdater("iframe1", "Ajax1.jsp", {}); > > but it doesn''t work (rendering blank space). I''ve use div and span as > container, both worked magic. Is this a known problem? I''ve searched > the discussion with these terms, and was surprised no one raised the > issue before. Does anyone know a fix? I need to use iframe to keep a > consistent look throughout the site. > > Many thanks. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I have an index.jsp that contains the iframe. I wish to refresh the content of the iframe, ie, ajax1.jsp, periodically. Both index.jsp and the ajax1.jsp reside in the same directory, if I understand your question correctly. Thanks for the prompt response! On Apr 29, 3:45 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> are you trying to get the iframe to load content from a different domain? > > > > On Tue, Apr 29, 2008 at 3:41 PM, Debbie <liu9...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello all, > > > I''ve tried to use an iframe as in > > new Ajax.PeriodicalUpdater("iframe1", "Ajax1.jsp", {}); > > > but it doesn''t work (rendering blank space). I''ve use div and span as > > container, both worked magic. Is this a known problem? I''ve searched > > the discussion with these terms, and was surprised no one raised the > > issue before. Does anyone know a fix? I need to use iframe to keep a > > consistent look throughout the site. > > > Many thanks.- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ajax.PeriodicalUpdater updates an elements innerHTML. You cannot set the iframes innerHTML. - JDD --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
true, but, you can do it a lot easier by simply putting in a refresh meta tag in the ajax1.jsp file On Tue, Apr 29, 2008 at 4:47 PM, jdalton <John.David.Dalton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > Ajax.PeriodicalUpdater updates an elements innerHTML. > You cannot set the iframes innerHTML. > > - JDD > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the insight. I started googling right after seeing your reply, will post if I find any work around. On Apr 29, 4:47 pm, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ajax.PeriodicalUpdaterupdates an elements innerHTML. > You cannot set the iframes innerHTML. > > - JDD--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the reply. What you''re suggesting is to reload the page upon a timeout, and it shows to the user. With Ajax, it''s undetectable to the user unless there''s a change on the page. I prefer to resolve the issue with ajax, will post back if solution is found. On Apr 29, 6:13 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> true, but, you can do it a lot easier by simply putting in a refresh meta > tag in the ajax1.jsp file > > On Tue, Apr 29, 2008 at 4:47 PM, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > Ajax.PeriodicalUpdater updates an elements innerHTML. > > You cannot set the iframes innerHTML. > > > - JDD- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ok then, its an iframe, which makes the iframe the parent, so therefore put the ajax.updater code in the ajax1.jsp file to be loaded when the iframe loads On Wed, Apr 30, 2008 at 10:53 AM, Debbie <liu9471-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Thanks for the reply. What you''re suggesting is to reload the page > upon a timeout, and it shows to the user. With Ajax, it''s > undetectable to the user unless there''s a change on the page. I > prefer to resolve the issue with ajax, will post back if solution is > found. > > On Apr 29, 6:13 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > true, but, you can do it a lot easier by simply putting in a refresh > meta > > tag in the ajax1.jsp file > > > > On Tue, Apr 29, 2008 at 4:47 PM, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > > > > > > > > > > Ajax.PeriodicalUpdater updates an elements innerHTML. > > > You cannot set the iframes innerHTML. > > > > > - JDD- Hide quoted text - > > > > - Show quoted text - > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Trash the IFRAME, any object, such as a DIV can and will perform in the way you''re envisioning. With the IFRAME the user loses sight of the interface when it begins its request, at the start of refresh. The UI doesn''t return until the iframe is finished with the request, where as inserting new content into a DIV that was retrieved behind the scenes allows a much more seamless user experience. So my suggestion is, just ditch the IFRAME for a DIV and have that DIV stake claim on the same real estate the iframe had. The only difference will be that you need to make an initial request to populate on load, no big deal. On Apr 30, 11:06 am, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ok then, its an iframe, which makes the iframe the parent, so therefore put > the ajax.updater code in the ajax1.jsp file to be loaded when the iframe > loads > > On Wed, Apr 30, 2008 at 10:53 AM, Debbie <liu9...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thanks for the reply. What you''re suggesting is to reload the page > > upon a timeout, and it shows to the user. With Ajax, it''s > > undetectable to the user unless there''s a change on the page. I > > prefer to resolve the issue with ajax, will post back if solution is > > found. > > > On Apr 29, 6:13 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > true, but, you can do it a lot easier by simply putting in a refresh > > meta > > > tag in the ajax1.jsp file > > > > On Tue, Apr 29, 2008 at 4:47 PM, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > Ajax.PeriodicalUpdater updates an elements innerHTML. > > > > You cannot set the iframes innerHTML. > > > > > - JDD- Hide quoted text - > > > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you use the Ajax.PeriodicalUpdater, it does this automagically! The moment the element is extended with that method, a request is made to populate it for the first time, then it settles down to updating according to the schedule. What I usually do is put a little bit of text and a link into the div, just to cover for non-scripted visitors. This gets replaced before the page has even finished loading, so people with scripting don''t even see it. Walter On May 1, 2008, at 12:33 PM, Matt Foster wrote:> The only difference > will be that you need to make an initial request to populate on load, > no big deal.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---