Jeremy Kitchen
2006-Mar-08 20:21 UTC
question about auto-updating div with overflow:auto and maintaining position
I have a div (with overflow:auto) that gets stuff added to it via
Ajax.PeriodicalUpdater, and I''d like to keep it scrolled to the bottom
all
the time, unless the user manually scrolls away from the bottom (and be able
to return it to its bottom-sticky form afterwards)
I''m not sure if this is just some css trickery I need to do, or if it
requires
some javascript to do it.
Here''s what I have so far (yes, I''m creating an online chat
interface)
http://edge.scriptkitchen.com:81/~kitchen/chat.html
I tried putting a <a name="bottom" id="bottom" /> at
the bottom of the div,
and an oncomplete with effect.scrollto(''bottom'') but that
didn''t do anything,
presumably because effect.scrollto is checking the scroll position of the
overall window (which should theoretically never scroll) rather than the
scroll position of the div itself.
Any help would be greatly appreciated :)
Thanks!
-Jeremy
--
Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org
In the beginning was The Word and The Word was Content-type: text/plain
-- The Word of Bob.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Maybe Matching Threads
- RE: question about auto-updating div withoverflow:auto and maintaining position
- RE: question about auto-updating divwithoverflow:auto and maintaining position
- Effect.toggle error in 1.6.1
- [prototype] Selector class fails on selector strings with spaces
- prototype.js Event.stopObserving
