ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Ajax call blocked until other ajax calls completed
Title:
B
I
{code}
?
I have multiple ajax calls on a page with async:true. While waiting for their result, I have a control using "AjaxDropdownFor" that blocks until all ajax calls have completed. Then the dropdown displays its options. Is there a setting that ensures the AjaxDropdownFor does not block waiting for other ajax calls to complete?
Save Changes
Cancel
rakesh
asked at 05 Nov 2018
Answers
B
I
{code}
?
not sure what you mean by blocks (client / server) by using `.DataFunc(str)` instead of `Url` you can have complete control over the way the control gets data, so your function could look like this: function getData() { // in this example wer're doing an ajax request, you could return `KeyContent[]` // without the ajax request if you have it available return $.post('@Url.Action("GetCategories", "Data")').then(function(result) { return result; }); } and to use it set `.DataFunc("getData")` --- *update:* given your explanation in a disqus comment, the problem is the fact that you are doing more than 10 ajax requests at the same time, which also take a long time to finish, and you have reached the browser limit for concurrent ajax requests
Save Changes
Cancel
Omu
answered at 05 Nov 2018
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK