I'm using jQuery BlockUI. In every AjaxCall i am blocking form with BlockUI Plugin. But Ajax request may continue 1 second or maybe more than minute. so i don't want to block form whe开发者_开发技巧n request will take a few second. how i can do it?
Can't be done.
How is your code going to know what ajax calls are going to be simple beforehand?
Code: "I'll start blocking now...."
Code: "What? Already done? But it was only 1.5 seconds and I'm only supposed to block if the request takes longer than 5 seconds."
Code: "I'll have to send a message back in time to myself and tell me not to block this call."
It's up to you to determine when to use BlockUI or not.
精彩评论