Solved

jQuery Ajax delay calls

Posted on 2013-01-23
1
353 Views
Last Modified: 2013-02-13
I've got product filtering on my webpage whereby clicking checkboxes sends a new call for the products filtered by the selection.
But I don't want to allow multiple calls being made one after the other
What is the best way to delay the call by say 1 second? A timeout?
The ajax call should be cancelled if another ajax call is initiated.
0
Comment
Question by:Gary
1 Comment
 
LVL 12

Accepted Solution

by:
sivagnanam chandrakanth earned 500 total points
ID: 38813166
There are two ways of doing it..

one is to abort the previous call and the other is by showing a div container as loading and allowing to click anything by

see both examples

http://stackoverflow.com/questions/3312960/jquery-abort-ajax-request-before-sending-another

http://stackoverflow.com/questions/9331161/prevent-other-links-from-working-during-ajax-call
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question