Atozed Forums

Full Version: Intraweb Function Call from HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was using bootstrap components to make responsive size adjustable web application but the problem I am getting is all the component calls client side java script as far as I understood. 
it can call Java script Function written in the same page or it redirects to another page.
But can I call a custom function written in C++ in my web application as I can call it within the web application.
If I understand correctly, you basically want to call a function in your application, written in C++, from your page (i.e. an event from a component on that page). Is that correct?

If that's correct there are several ways to accomplish that. I don't have a C++ Builder demo ready, but there is one written in Delphi which should be quite simple for you to understand how it works. Please have a look:

https://github.com/Atozed/IntraWeb/tree/...ewCallback
(08-18-2020, 12:17 PM)Alexandre Machado Wrote: [ -> ]If I understand correctly, you basically want to call a function in your application, written in C++, from your page (i.e. an event from a component on that page). Is that correct?

If that's correct there are several ways to accomplish that. I don't have a C++ Builder demo ready, but there is one written in Delphi which should be quite simple for you to understand how it works. Please have a look:

https://github.com/Atozed/IntraWeb/tree/...ewCallback

Yes sir,
That's correct. But I want to call it from HTML template page.
like calling from menu item.
if menu item selected [student list] i need to call loadstudentlist function. currently I am redirecting to another page and showing student list.
Hi, you can call from html template in your menu list, something like this:
Code:
<li><a href="#" onclick="return ajaxCall('YOUR_DELPHI_FUNCTION', 'parametermenulist=student_list');"><i class="fas fa-map-pin"></i><p>student_menu1</p></a></li>
(08-19-2020, 11:45 AM)Jose Nilton Pace Wrote: [ -> ]Hi, you can call from html template in your menu list, something like this:
Code:
<li><a href="#" onclick="return ajaxCall('YOUR_DELPHI_FUNCTION', 'parametermenulist=student_list');"><i class="fas fa-map-pin"></i><p>student_menu1</p></a></li>
Thank you sir
It is working for me as I wanted.

Thanks to both of you.