Couple of questions about the browser widget
Mike Bonner
bonnmike at gmail.com
Tue Aug 15 20:23:55 EDT 2017
For the second question, if your htmltext contains a javascript function
that returns document.body.scrollHeight you should be able to get the
height that way. I'm not any good at javascript, but how it would
probably work would be to have something like this..
window.onload = function(e){
livecode.myHeight('lcHeight",document.body.scrollHeight)
}
Then have an lcHeight handler defined in your stack to receive the message.
command lcHeight pHeight
-- do something with pHeight
end lcheight
Then of course you have to declare the handler..
set the javascripthandlers to "lcHeight"
I haven't actually done this, but think the idea is close enough to get you
there.
On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
use-livecode at lists.runrev.com> wrote:
> I’m thinking about replacing a field object that contains text, inline
> images and simple tables with the browser widget but there are a couple of
> issues I’d need to work through first and would welcome any suggestions or
> ideas.
>
> The first one concerns displaying local images – either stored
> (permanently or temporarily) within the stack itself or in the local
> documents/whatever folder. I’d like to set the htmlText of the browser
> rather than a url. If that’s the case, how do I refer to the image in order
> for it to be displayed?
>
> The second one is whether it is possible to get the ‘formattedHeight’ of
> the browser content. I’d ideally like to combine the browser with a couple
> of other grouped controls so that I can scroll them as a single object. Is
> that doable?
>
> Regards,
>
> Terry...
> _______________________________________________
> 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