I’m calling FB.api(…) with an FQL query whenever an input‘s keyup event is fired. Is it possible to cancel the previous request to query the (newer) updated query, or do I have to wait it out?
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.
If the request is already sent, then it could not be canceled.
What you could do is to delay sending the request by using
setTimeout, and cancel the previous delay when the next keyup event fired.