07-13-2018, 08:15 AM
Hello,
I am trying to integrate an anonymous function into a js component that calls the backend and returns a value depending on the state of the backend. I am using IW 15 and Delphi 10.2.3 Enterprise and IWBS.
Within the Bootstrap FIle Input I attach an anonymous function:
This works well. But in my application I want to go back to the backend, look, whether the file may be deleted at all and in case of yes, display the boostrap dialog instead of the native confirm box.
As everything runs asynchonous, I am a bit lost and have no Idea on how to accomplish this with calls to the backend.
Any help is very appreciated.
Thanks!
I am trying to integrate an anonymous function into a js component that calls the backend and returns a value depending on the state of the backend. I am using IW 15 and Delphi 10.2.3 Enterprise and IWBS.
Within the Bootstrap FIle Input I attach an anonymous function:
Code:
'$("#{%htmlname%}").on("filebeforedelete", function() {' +
'return !window.confirm("Do you really want to delete the file?");});';
This works well. But in my application I want to go back to the backend, look, whether the file may be deleted at all and in case of yes, display the boostrap dialog instead of the native confirm box.
As everything runs asynchonous, I am a bit lost and have no Idea on how to accomplish this with calls to the backend.
Any help is very appreciated.
Thanks!