How to AutoScroll an HTMLView() ?

BlitzPlus Forums/BlitzPlus Programming/How to AutoScroll an HTMLView() ?

Gabriel(Posted 2003) [#1]
I have an HTMLView on my program and I need to refresh it quite often. When I refresh it, it obviously goes back to the top of the page.

Now that's a problem for me. A big problem. What I really need is a way to have the HMTLView scroll absolutely to the bottom of the page whenever I refresh it.

I'm kinda concerned that it might not be possible to do, so please prove me wrong. It's gonna mean binning about two weeks full time work if it's not possible, and I really hate when that happens.


Todd(Posted 2003) [#2]
You could do this with Userlibs, but the easiest way would be to add some JavaScript to the page that automatically scrolls it to the bottom. That is, if you have access to the HTML before the page is loaded. If you need the JavaScript to do that, then I can get it for you.


Binary_Moon(Posted 2003) [#3]
The easiest way to do this would be to add an anchor at the bottom of the page then load the anchor with htmlviewgo

so after all your content add

<a name="bottom">


then use

htmlviewgo htmlview,"page.htm#bottom"


to reload the page (I assume this will work with blitz+)


Gabriel(Posted 2003) [#4]
Doh.. I was thinking about userlibs and the API, and all the time the answer was in the HTML. Yes, I'm creating the HTML locally, so I can absolutely do that.

I was so intent on thinking programming that the content of the page never occurred to me.

Thanks guys. That's a massive help.