Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling a C++ Builder function and passing parameters from a Javascript function
#1
Hi people,

I need to call a c++ builder function from a HTML button. 

My HTML is something like this:

Code:
<button id="WHATEVER" onClick="add(2,2);">ADD 2 + 2</button>

I know that i can call some functions using the button events (async or not) but i need to call a function with parameters like that:

Javascript Code:

Code:
function add(a,b)
{
       var result = a + b;
       DisplayNumber(result);
}

C++ Builder Code:

Code:
void __fastcall TForm1::DisplayNumber(int number)
{
       ShowMessage(number);
}

Is this possible?

Thanks to all
Reply


Messages In This Thread
Calling a C++ Builder function and passing parameters from a Javascript function - by amine1980 - 03-27-2019, 07:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)