Couple of questions about the browser widget

Terry Judd terry.judd at unimelb.edu.au
Tue Aug 15 20:34:04 EDT 2017


Thanks for your help Mike – I’m no good at Javascript either ;) but thankfully there is plenty of stuff out there on the web written by people that are. I’ll give it a go and see if I can make it work.

Regards,

Terry...

On 16/08/2017 10:23 am, "use-livecode on behalf of Mike Bonner via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    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
    _______________________________________________
    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