开发者

Ways to monitor the ajax call and wait for the same

开发者 https://www.devze.com 2023-02-18 11:01 出处:网络
I am calling a Ajax call from my asp.net page. I have a combo box called technology and when i select some value from it, i am calling an Ajax call which will trigger a function which talks to DB and

I am calling a Ajax call from my asp.net page. I have a combo box called technology and when i select some value from it, i am calling an Ajax call which will trigger a function which talks to DB and then returns the Vendor name. Here if the data is very less then then call immediately returns and updates the associated fields. If the da开发者_JAVA百科ta is huge, the Ajax call is taking long time and before that if the user saves the form, it stores with null value. Here i should restrict the user from clicking any thing on the screen till the Ajax call is finished. For that, i need to know how can we track the Ajax call completion and how the ajax call can be monitored?

Can somebody help me in this?

Thanks in advance, Ramprasad


I suggest you use Fiddler, its excellent for things like this.


I suggest you just to block form send button till all data would be filled. So user will need to wait of loading this select box. And also change value of combo box to "loading.." or something like this, so user see that there are some things doing.

Also you shouldn't block all from when combo box loading, because at this time user can fill some other form fields.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号