Something like this:  http://www.javascriptkit.com/javatutors/advwin3.shtml

This seems like something the framework should do somehow...Maybe not though.

Either way it's very easy to add some javascript manually via java:

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/services/ResponseBuilder.html

You'll notice that ResponseBuilder now implements
PageRenderSupport/ScriptProcessor - which are the main sort of
javascript processing interfaces for Tapestry traditionally...I guess
add something via

ResponseBuilder.addBodyScript(this/** this being your component, helps
the ajax processing */, "string of javascript stuff" );

On 2/8/07, Leffel, Daniel <[EMAIL PROTECTED]> wrote:
Hi all,
Hopefully easy question. I've built a little chat interface. After
submitting a chat message, the response builder returns the div to the
top scroll position. How can I reset the scroll position to the bottom
after the update.

I thought I could use something like:
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;


Which component and which event do I attach to though? Is there a better
way (i.e. setting the property within the Java code instead -I'd prefer
to control it there)?

Danny

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to