How to call an asynchronous JavaScript function and block the original caller

前端 未结 5 985
耶瑟儿~
耶瑟儿~ 2020-12-28 16:57

I have an interesting situation that my usually clever mind hasn\'t been able to come up with a solution for :) Here\'s the situation...

I have a class that has a g

5条回答
  •  执笔经年
    2020-12-28 17:20

    When your async method starts, I would open some sort of modal dialog (that the user cannot close) telling them that the request is in process. When the request finishes, close the modal in your callback.

    One possible way to do this is with jqModal, but that would require you to load jQuery into your project. I'm not sure if that's an option for you or not.

提交回复
热议问题