I have a javascript widget witch provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created.
I've added an ... |
I need to use a custom prompt, just like the one shown in this jQuery plugin demo.
The problem is, all custom prompts depend on a callback, they are asynchronized, i ... |
I am fading elements one by one but it seems it all fades at once.
How can I fade elements one by one. Only if one fades completely, should the second start ... |
I'm trying to do a cross domain POST request and have hit a wall (or two).
I can't put a proxy page on the server - so that is not an option.
I ... |
Is there a way to run a function after another functions completes? For example:
doSomething();
doSomethingElse();
i only want doSomethingElse() to run after doSomething completes. is this possible?
|
I have been under the impression for that JavaScript was always asynchronous. However, I have learned that there are situations where it is not (ie DOM manipulations). Is there ... |
Please forgive me if this is an obvious one.
I have an unknown amount of elements on a page, which I need to loop through one at a time and do stuff ... |
|
Can I make use of jQuery AJAX API and make a synchronous calls?
|
the question is fairly simple and technical:
var it_works = false;
$.post("some_file.php", '', function(data) {
it_works = true;
});
alert(it_works); # false (yes, that 'alert' has to be here and not ...
|
I'm trying to get the value of the cookie after it's been modified and pass it to a script (via http GET).
Here's my code:
<script>
function editCookieValue() {
// function that sets/edits ...
|
Does jQuery.ajax({async: false}) still use the XMLHttpRequest object?
If so, how is the request synchronous?
Is there just some mechanism inside the function definition that allows the asynchronous request put out by the ... |
I have a function that makes ajax GET request and based on the value returned sets one global JS variable. I use this variable (isCalculateTax in the code below) for further ... |
I was just reading another question about jQuery's synchronous ajax call, and I got to wondering:
What circumstances make a synchronous version of an ajax call beneficial/necessary?
Ideally I'd like an ... |
I have a web app that makes a ton of $.post() requests. The server must receive these in the order that they were created. To guarantee this, I first thought I'd ... |
Why don't return that function the responseText?
function LoadBookmarksAsXml()
{
return $.ajax(
{
type: 'GET',
async: false,
url: 'http://www.google.com/bookmarks/?output=xml&num=10000'
}).responseText;
}
(It ... |
I have a function called:
function callAjax(url, data) {
$.ajax(
{
url: url, // same domain
data: data,
...
|
I have a calendar with data that is on the server. When the user moves forward by a month, I might (based on previous actions) need to fetch that data ... |
I have the following code which I want to be running asynchronously, but the logs are showing that they are running synchronously.
$(".widget").each(function() {
// snip - url, def, ...
|
I'd like to change my following code from synchronous to async AJAX for performance reasons.
Is this possible?
I'm finding that almost all of my AJAX calls are synchronous, so I sense that ... |
This is similar to the "answered" question
JQuery AJAX request behaving synchronous for unknown reason
I believe that the actual issue with parallel execution observed by MGM has been overlooked and actually ... |
I'm sending out a bunch of getJSON() requests to a remote server (to fetch images), and I'd like to display the responses (images) in the same order in which I send ... |
I have this code snippet from something i am developing
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("#Submit").click(function(){
...
|
This question could surely be applied to jQuery but in this case I am referring to Prototype. In the Prototype doc it says,
Since synchronous usage is rather
unsettling, ... |
I have an strange behavior, which looks lika an problem with (a)synchronous method calls?!?
I'm not sure!
An function receives data using getJSON, post process those data, add them to an table, which ... |
If I have a synchronous ajax call running, and an asynchronous call is made while that is happening (via setTimeout() ) will the second call stop/interupt/have any impact on the ... |
I've done some jQuery in the past, but I am completely stuck on this. I know about the pros and cons of using synchronous ajax calls, but here it will ... |
I have a code which needs to be executed after some delay say 5000 ms.Currently I am using setTimeout but it is asynchronous and i want the execution to wait for ... |
Very Sorry for my english,i have a problem.
$("#MainPicture").attr("src", url);
CenterImg();
needs to be execute line 2 code after line 1 code finished . it is asynchronous and i want the code excute ... |
I'm confused by the term asynchronous when related to programming. It seems to mean the opposite in programming terms as what it is defined as in the dictionary. For ... |
consider this scenario for validating:
function validateForm (validCallback) {
$('#first-name').add($('#last-name')).add($('#address')).each(function () {
// validating fields and adding 'invalid' class to invalid fields.
});
...
|
I'm trying to retrieve account information for multiple accounts transforming the XML data to JSONP. The problem is that all the functions get kicked off at the same time and ... |
I was reading here that synchronous ajax calls in jquery don't time out.
Is this a technical limitation, or just something the authors didn't feel like supporting? What actually ... |
Ok, so I need to open a dialog (jQuery UI) before performing the actual AJAX request and depending on what the user chooses, continue with the AJAX request or simply do ... |
The first thing I would like to say is that I looked around for an answer to this for quite some time, but everything I found was about jQuery. This is ... |
|
function t1(next) { var i1 = $('#item1'); var i2 = $('#item2'); var i3 = $('#item3'); $.when( i1.delay(1000).show(0).delay(300).hide(0), i2.show(0).html('OOOOOOOOOOOOOOOOOOOOOOOOOOOO').delay(7000).hide(0), i3.html(' ').delay(1300).show(0) ).done( next() );}function t2(next) { var i5 = $('#item5'); $.when( i5.show(0).animate({ 'left': '+=50%', 'top': '+=30%' }, 200).animate({ 'left': '-=50%', 'top': '-=30%' }, 200).animate({ 'left': '+=50%', 'top': '+=30%' }, 200).animate({ 'left': '-=50%', 'top': '-=30%' }, 200) ).done( next() );}function t3(next) { ... |
basically i created an array of promise objects, passed them into the jQuery.when method using .apply so that each array element would become an argument to the jQuery.when method, then i called .then() on the resulting promise object with a callback so that when all passed in promise objects are resolved, the callback will run. |
|
hi there, i have to populate a combo with data retreived through an asynchronous ajax with $.post and after that disable some of the combo's options depending on one selected in another list.i don't know whether to use synchronous ajax (sjax) or to call in the success function of the $.post a function that remove the options. the thing is that ... |
My system is dynamically template-loading. Base scripts loaded after loading the homepage include some alert boxes and a date picker box, and it eventually loads some template with its scripts and styles and pastes them into the homepage. The scripts of the loaded template contain some functions to operate the date picker box. Thus, the date picker box has functions, some ... |
|
I'm trying to load a JQuery dialog containing content from thebackend.JQuery places this dialog vertically in the middle of the page whenthe dialog open call is executed.But the moment that happens, another function is still loading dataand parsing that data in the dialog.So it is not completed yet.This way, the dialog is not centered in the middle of the page becausethe ... |
Hi Maxim,thanks for your idea, I've tested it.- with firefox 3.5 under ubuntu-- ajax: false and true, with one, or two script-tags and a localscript-src it always works as expected-- with a remote file and one script-block it always works like havingstated async: true with two script blocks it always behaves like async: falseOne now could think, fine lets use two ... |
Hi,I'm trying to implement a client side cache for an ajax basedapplication but I'm not sure how to deal with the asynchronous natureof ajax calls in jquery. What I'm basically trying is to create afunction getList() that fetches a snippet of text from the server andstores it in a variable so that future invocations of getList() nolonger have to contact the ... |
hi, I'm trying to make a little loop that in each itteration executes a little php script to send mail with the mail() function. the php script returns either succes or failure. Now its my intention to append that msg to a div, after every execution. $.ajax({ type: "POST", data: dataString2, url: "sendmail.php", async: false, success: function(result) { showStatus(result); y++; zendMails(y); ... |
|