set HtmlView slider bar value?

BlitzMax Forums/MaxGUI Module/set HtmlView slider bar value?

daaan(Posted 2012) [#1]
Is it possible to set the slider bar value for an HtmlView gadget?


jsp(Posted 2012) [#2]
There is no MaxGUI command for it, but you could use JavaScript.
The example below will load a page and when done scroll to the bottom...




daaan(Posted 2012) [#3]
Is there a way to scroll by a percentage? Each page has a different height and I can't seem to get it right.

Any ideas?


daaan(Posted 2012) [#4]
I tried adding a simple modifier:

HtmlViewRun(HTML, "window.ScrollTo(0, document.body.scrollHeight*"+ScrollPercent+");")

This seems to work fine on the first page but then whenever I navigate to a new page it is no longer accurate.

Last edited 2012


jsp(Posted 2012) [#5]
Sorry, I am no JavaScript expert, so it looks like the scrollheight is may not referencing the current value.
You could post this question in the general discussion forum as there are some good people doing webdesign and know such stuff, or post in a forum specialized for JavaScript.