Thanks, I would never be able to figure this out and Google didn't help.
Initially there was no joy, as it still didn't work in convoluted 7000 line Javascript which I tried to amend. But simple example confirmed that it works.
>To call a js-function from VFP, you must always pass at least one parameter. That's a change from older versions of JS.
https://west-wind.com/wconnect/weblog/ShowEntry.blog?id=912>
>Try this instead:
>
>oBrowser.Document.parentWindow.my_js_function(.F.)
>or
>oBrowser.Document.Script.my_js_function(.F.)
>
>>It is not that straightforward, InvokeScript convenience method for .Net, it is not exposed when IE ActiveX is used in Foxpro.
>>something like
>>oBrowser.Navigate("my_html_file_with_js.html" )
>>oBrowser.Document.parentWindow.my_js_function()
>>or
>> oBrowser.Document.Script.my_js_function()
>>is not working anymore.
>>It seemed to work in 2008 :)
>>
https://weblog.west-wind.com/posts/2008/sep/27/calling-javascript-functions-in-the-web-browser-control>>
>>
>>>Yes, nearly identical, as IE is activeX. Did a lot of that last century when IE was dominant, but today more and more devs want to escape IE problems. Also I found newer versions of IE to be less stable as activeX components than in IE4-IE6 times, but that might be a misperception as back then I spent much more time roboting WebBrowser and InternetExplorer.Application.
>>>
>>>Unless your need is a short time temp solution, implement with different tool set.
>>>
>>>>Can I do something similar to Windows Forms and its Web Browser Control in Foxpro form with its Internet Explorer control.
>>>>C# line of code
>>>>
>>>> webBrowser1.Document.InvokeScript("openPdfAsBase64", new[] { asBase64 });
>>>>