I want a “Check all” check box in a grid to let the data get updated in DB thru ajax.. but due to restriction of 2 calls at a time I am not able to make it happen. Help me to resolve the issue.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question is a little vague, but I suppose you are sending one Ajax request for each checkbox that’s being checked, when the user clicks the “check all” button ?
If so, you should modify your code, so only one Ajax request is sent ; it should say the server “oh oh, all checkboxes have been checked, do your stuff“, instead of just saying “one checkbox has been checked“.
This way, no matter what the user does, you only have one Ajax request, which means :
(But, yes, I admit, it means modifying your code a little bit 😉 )