Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mixing javascript and VFP
Message
From
06/12/2018 10:58:21
 
 
To
06/12/2018 10:28:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Application:
Desktop
Miscellaneous
Thread ID:
01664202
Message ID:
01664204
Views:
86
>Is it possible to mix javascript code and VFP code.
>
>For example, I want to execute a loop in javascript. Within that loop I want to add a record in a VFP table. So later I'll be able to know what operations were successfull and which operatione were unsuccessfull.

Create a VFP app that exposes functions in a COM-based DLL, and then call those functions from javascript.

In IE:
var obj = new ActiveXObject("myDll.testMethod");
var vResult = obj.TestMethod();
alert(vResult);
Some other references:
https://stackoverflow.com/questions/1550112/how-to-call-user32-dll-methods-from-javascript
Previous
Reply
Map
View

Click here to load this message in the networking platform