Scroll DHX Window content


I’m using attachHTML() to put the data returned from an AJAX call into a dhx.Window, but I want it to scroll to the bottom when the content is longer than can be shown in the window. I have tried using getContainer() like this:

let cont = win.getContainer();
cont.scrollTop = cont.scrollHeight;

but that seems to only get the outer container of the window and does not address the contents of the window, so it does not scroll. getWidget() returns undefined, I’m sure because it’s HTML and not a DHX widget.

I’m sure there’s an easy way to do this that I’m overlooking, but I could sure use some help finding it.


You may try to use the following solution: