Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anonymous js function with callback to backend
#1
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:


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!
Reply


Messages In This Thread
Anonymous js function with callback to backend - by mschumann - 07-13-2018, 08:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)