access scroll of browser widget

Ralph DiMola rdimola at evergreeninfo.net
Wed Jul 21 13:24:14 EDT 2021


Ben,

Setting the x/y scroll is easy:
do "window.scrollTo(0,500);" in widget "nameOfBrowserWidget"
See https://www.w3schools.com/jsref/met_win_scrollto.asp

I don't know how to get the current scroll position on random pages. If you
have control of the html then you can set the javascriptHandlers in LC and
have a callback to LC from a JavaScript handler in the html to interrogate
the current scroll position.


Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Ben Rubinstein via use-livecode
Sent: Wednesday, July 21, 2021 12:44 PM
To: Use LiveCode
Cc: Ben Rubinstein
Subject: access scroll of browser widget


The browser widget has properties hScrollbar and vScrollbar - but doesn't
appear to have properties hScroll or vScroll.

Is there any way to get and set the scroll (FWIW I'm only interested in the
vertical) of a browser widget?

TIA,

Ben

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list