Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anonymous js function with callback to backend
#4
After doing a lot of experiments I learned that it is not feasable to have a synchrnous callback into the backend.

I decided to return false in these cases to abort the operation and call the backend. The backend then initiates the operation if allowed and confirmed by the user. In case of the file input it deletes the file in the database and then refreshes the file input control to reread the contents. In case of the menu it creates the required code and calls Javascript to open the menu.

I learned that is is essential to learn that everything between frontend and backend has to be asynchronous and - with a little thinking - this is possible in most cases. I was lead to the wrong way through many years synchronous fat client development...
Reply


Messages In This Thread
RE: Anonymous js function with callback to backend - by mschumann - 08-24-2018, 03:27 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)