[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

jQuery Ajax delay calls

Posted on 2013-01-23
1
Medium Priority
?
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
sivagnanam chandrakanth earned 1500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
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)

650 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