access scroll of browser widget

Ben Rubinstein benr at cogapp.com
Thu Jul 22 03:53:31 EDT 2021


Thanks Ralph - this is without any access to the html or javascript - generic 
browser that the user might point anywhere.

Thank you,

Ben

On 21/07/2021 18:24, Ralph DiMola via use-livecode wrote:
> 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
> 
> 
> _______________________________________________
> 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