Of course this assumes that new messages are added to the bottom - like most chat apps. ---John<br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 5:17 PM, John Chludzinski <span dir="ltr"><<a href="mailto:john.chludzinski@gmail.com">john.chludzinski@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>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:</div>
<div><br></div><div> self pusher javascript: [ :script |</div><div> script element</div><div> id: 'messages';</div><div> insertBottom: [ :html | self renderMessage: aBlock class: aString on: html ]].<br>
<br></div><div><br></div><div>and well as with the newer (when I'm not using SUTreeReport):</div><div><br></div><div> self pusher javascript: [ :script |</div><div> script << (script jQuery: #messages)</div>
<div> prepend: [ :html | self renderMessage: aBlock class: aString on: html ]].<br></div><div><br></div><div>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.</div>
<div><br></div><div>I assume this isn't trivial since it wasn't done originally?</div><div><br></div><font color="#888888"><div>---John</div>
</font></blockquote></div><br>