"get in widget"?? How can I get a value out of a browser widget into LiveCode?

Ben Rubinstein benr_mc at cogapp.com
Mon Apr 17 11:17:31 EDT 2023


Thanks Klaus, I tried both of those!

So for example I can execute
	do "alert(document.title)" in widget "browser"

and see the expected string in an alert box. But
	do "document.title" in widget "browser"; put it

or
	do "document.title" in widget "browser"; put the result

just put empty.

Any other ideas? I don't know whether I need to do something different in the 
livecode end (probably) or in the javascript end.

TIA,

Ben


On 17/04/2023 16:11, Klaus major-k via use-livecode wrote:
> Hi Ben,
> 
>> Am 17.04.2023 um 16:37 schrieb Ben Rubinstein via use-livecode <use-livecode at lists.runrev.com>:
>>
>> Thanks to this list, I know about "do in widget" that can cause some javascript to be evaluated in the current page in the browser widget. Which is great.
>>
>> But how do I get (into LiveCode) the result of a javascript expression?
> 
> if in doubt try either -> IT or -> the result :-)
> 
>> TIA,
>>
>> Ben
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> klaus at major-k.de
> 
> 
> _______________________________________________
> 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