Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possibile errors in IWBootStrap Library
#11
(10-09-2019, 02:43 PM)kudzu Wrote: In the JS world this is normal. They use Promises and other async mechanisms to deal with it on the client side.

Thanks at all for the responses.

Andrea
Reply
#12
(10-09-2019, 09:46 AM)Alexandre Machado Wrote: You are clearly relying on an implementation detail in order to make this "work" (even in IW 14.1.14). There is no obligation for the ajax subsystem to wait for the first request/response cycle to be fully processed in order to send the next request...

I'll have a second look at your application and find the best way to solve it. Please hold on.

Hi Alexandre,
any update for an example of use callback in this specific case?

Thanks you

Andrea
Reply
#13
(10-09-2019, 02:43 PM)kudzu Wrote: In the JS world this is normal. They use Promises and other async mechanisms to deal with it on the client side.

He is not using promises, nor chained callback calls. In that example he just fires 2 Ajax calls in sequence and "hopes" that the first response is available and fully processed before the second one is sent. This will never happen in any JS library/code.
Reply
#14
I think your example is a simplification of a different situation... if this was your real code I'd do it differently, because in the end only one call is needed.

Anyway, I'm considering that after the first ajax response, something in your page will update a hidden field and this hidden field value needs to be sent back to IW server. So here it goes.

I'm using a second ajaxCall() which will retrieve the hidden input value and submit it to the server.


Attached Files
.zip   Example2.zip (Size: 51.32 KB / Downloads: 3)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)