Just thought I would share this one.
I have a custom VFP section, with a webview control in a container I called alphaweb.
alphaweb is declared as public variable in my VFP Section.
I have the URL set to a jssp page that has several javascript functions declared in the jssp page.
I also have a python library that I am using for some image manipulation.
The challenge is to call the javascript functions from the python code.
Normally that's easy, I could use Lianja.get().webview, but recall the webview is in a custom section, so you need to reference it by public variable.
With a bit of tinkering, I found it was pretty easy.
Using Lianja.evaluate, I call the foxpro code to call the javascript code from the python code.
Like so.
Def procname():
----Lianja.evaluate('alphaweb.evaluate("addimage()")')
I thought it was pretty cool to be able to go back and forth between, the VFP, Python and javascript functions.
Lianja made that easy.
Thanks.
ps - I am sure there is an easier way, but it was still fun.
Bookmarks