systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-09 03:04 UTC
How can i scroll down a overflow:auto; with scriptacolous ?
Hi i have got a chartroom. tachiracompras.com/chat/ and when i send a new message the scroll class does not scrolls down i would like to add that property to my script can anyone help me solve this problem? thanks in advance.. Success and good luck !! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
try this: $(id).scrollTop = $(id).scrollHeight - $(id).clientHeight; id= the container''s id On Dec 9, 5:04 am, "systm.span...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <systm.span...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi i have got a chartroom. tachiracompras.com/chat/ and when i send a > new message the scroll class does not scrolls down i would like to > add that property to my script can anyone help me solve this problem? > thanks in advance.. Success and good luck !!--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-09 03:41 UTC
Re: How can i scroll down a overflow:auto; with scriptacolous ?
i did the change this way please tell me if i am wrong .. <script> function getMessages() { new Ajax.Updater( ''chat'', ''messages.php'', { onSuccess: function() { window.setTimeout( getMessages, 3600 ); } $(''chat'').scrollTop = $(''chat'').scrollHeight - $ (''chat'').clientHeight; } ); } getMessages(); </script> now this is the message iframe made on css.. <div id="chat" style="height:300px; width:550px; position:relative; overflow:auto; border:1px solid #7F9DB9; margin-bottom:15px;"> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andreas Franke
2007-Dec-11 06:56 UTC
AW: [Rails-spinoffs] Re: How can i scroll down a overflow:auto; with scriptacolous ?
Hi, by the way, why you don''t take use of Ajax.PeriodicalUpdater instead Ajax.Updater? Andreas ---------------------------------------------------------- Doc4PC IT-Vor-Ort-Service, Hauptstrasse 15, D-24850 Schuby Tel: 04621 485 194 Fax: 04621 485 196 eMail: info-8Zvurif+njuzQB+pC5nmwQ@public.gmane.org Website: http://www.doc4pc.de/ Inhaber: Andreas Franke Steuernummer: 29 099 04014 Umsatzsteuer-Identifikationsnummer: DE219521670 ----------------------------------------------------------> -----Ursprüngliche Nachricht----- > Von: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails- > spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] Im Auftrag von systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Gesendet: Sonntag, 9. Dezember 2007 04:41 > An: Ruby on Rails: Spinoffs > Betreff: [Rails-spinoffs] Re: How can i scroll down a overflow:auto; with > scriptacolous ? > > > i did the change this way please tell me if i am wrong .. > > <script> > function getMessages() > { > new Ajax.Updater( ''chat'', ''messages.php'', { > onSuccess: function() { window.setTimeout( getMessages, 3600 ); } > $(''chat'').scrollTop = $(''chat'').scrollHeight - $ > (''chat'').clientHeight; > } ); > } > getMessages(); > </script> > > now this is the message iframe made on css.. > > <div id="chat" style="height:300px; width:550px; position:relative; > overflow:auto; border:1px solid #7F9DB9; margin-bottom:15px;"> >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Wizz
2007-Dec-11 12:44 UTC
Re: How can i scroll down a overflow:auto; with scriptacolous ?
Using the PeriodicalUpdater might be better practice as Andreas noted... (http://prototypejs.org/api/ajax/periodicalUpdater) Right now every 6 seconds there are about 3 to 4 requests executed at the same time, after a while it becomes even more... The PeriodicalUpdater has a decay implemented, so if the chat is inactive, it starts to update the client less frequently. This might be better, because right now my browser (firefox) hangs everytime your requests are processed... even though there is no actvity. Greetz, Wizz On Dec 11, 7:56 am, "Andreas Franke" <i...-8Zvurif+njuzQB+pC5nmwQ@public.gmane.org> wrote:> Hi, > by the way, why you don''t take use of Ajax.PeriodicalUpdater instead > Ajax.Updater? > > Andreas > > ---------------------------------------------------------- > Doc4PC IT-Vor-Ort-Service, Hauptstrasse 15, D-24850 Schuby > > Tel: 04621 485 194 > Fax: 04621 485 196 > > eMail: i...-8Zvurif+njuzQB+pC5nmwQ@public.gmane.org > > Website: http://www.doc4pc.de/ > > Inhaber: Andreas Franke > Steuernummer: 29 099 04014 > Umsatzsteuer-Identifikationsnummer: DE219521670 > ---------------------------------------------------------- > > > -----Ursprüngliche Nachricht----- > > Von: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails- > > spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] Im Auftrag von systm.span...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > Gesendet: Sonntag, 9. Dezember 2007 04:41 > > An: Ruby on Rails: Spinoffs > > Betreff: [Rails-spinoffs] Re: How can i scroll down a overflow:auto; with > > scriptacolous ? > > > i did the change this way please tell me if i am wrong .. > > > <script> > > function getMessages() > > { > > new Ajax.Updater( ''chat'', ''messages.php'', { > > onSuccess: function() { window.setTimeout( getMessages, 3600 ); } > > $(''chat'').scrollTop = $(''chat'').scrollHeight - $ > > (''chat'').clientHeight; > > } ); > > } > > getMessages(); > > </script> > > > now this is the message iframe made on css.. > > > <div id="chat" style="height:300px; width:550px; position:relative; > > overflow:auto; border:1px solid #7F9DB9; margin-bottom:15px;">--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---