[Seaside] Re: Trying to get CTChat to behave like a normal chat app?

John Chludzinski john.chludzinski at gmail.com
Mon Nov 16 22:34:31 UTC 2009


Of course this assumes that new messages are added to the bottom - like most
chat apps.  ---John

On Mon, Nov 16, 2009 at 5:17 PM, John Chludzinski <
john.chludzinski at gmail.com> wrote:

> I'm trying to get CTChat to behave like a normal chat app by getting its
> #textArea (or my case a #div) to scroll automatically to the bottom when a
> new message is added.  But because I'm using SUTreeReport which relies on
> Prototype/Scriptaculous and since JQuery and Prototype/Scriptaculous won't
> work together, I need need a solution using the older:
>
>    self pusher javascript: [ :script |
>       script element
>          id: 'messages';
>          insertBottom: [ :html | self renderMessage: aBlock class: aString
> on: html ]].
>
>
> and well as with the newer (when I'm not using SUTreeReport):
>
>    self pusher javascript: [ :script |
>       script << (script jQuery: #messages)
>          prepend: [ :html | self renderMessage: aBlock class: aString on:
> html ]].
>
> I've tried adding PTElement>>scroll to the message cascade for "script
> element" to no avail.  I've also tried to see if there's something doable
> using CSS, which does not appear to be the case without some Javascript.
>
> I assume this isn't trivial since it wasn't done originally?
>
> ---John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20091116/9d2e883d/attachment.htm


More information about the seaside mailing list