How to tell if the page displayed in the Browser widget has scrolled

Tom Glod tom at makeshyft.com
Thu Nov 8 11:35:46 EST 2018


Hermann.... you are a rockstar.  I will use this method also. Thank you.

On Thu, Nov 8, 2018 at 10:55 AM, hh via use-livecode <
use-livecode at lists.runrev.com> wrote:

> James.
>
> You are looking for difficulties that are not present.
>
> A. Do once:
>
> A1. put into widget's or card's script
> (this is a javaScriptHandler):
>
> on jsNotify v
>   put the seconds &": "& v into fld "info" -- or your action
> end jsNotify
>
> A2. From a button or msg (or use the property inspector):
>
> put the javaScriptHandlers of widget "browser" into jsh
> if jsh is not empty then put cr & "jsNotify" after jsh
> else put "jsNotify" into jsh
> set the javaScriptHandlers of widget "browser" to jsh
>
> B. Do once for every new loaded page, no matter where from
> (say http://livecode.com), for example from a button:
>
> put "window.onscroll = function() { " & \
>     "if (window.innerHeight + window.pageYOffset >= " & \
>     "document.body.offsetHeight) " & \
>     "liveCode.jsNotify('I am at the bottom'); };" into js
> do js in widget "Browser"
>
> Then scroll the browser widget to bottom and watch your field "info".
>
> _______________________________________________
> 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