I know that about blockui, but my only reason for going synchronous
would have been so that the calling function would wait until the ajax
call had returned. I didn't need to block the interface. The main
function was generating a display, but needed an array of user ids from
the server. In ste
Christopher Jordan schrieb:
> Thanks so much for responding. I did manage to work around the
> problem, by calling the function with the ajax call first and then the
> function that uses the return object second. Both ways work, so it's
> nice to see that if I do something like that again, I cou
John,
Thanks so much for responding. I did manage to work around the problem,
by calling the function with the ajax call first and then the function
that uses the return object second. Both ways work, so it's nice to see
that if I do something like that again, I could just add an 'async:
fals
To make your call synchronous, try something like this:
if(mode == "edit"){
var userObj = getActiveUsers();
// if I dump userObj here...
dump(userObj); // dump shows that userObj is undefined. :o(
}
function getActiveUsers(){
return eval("(" + $.ajax({
type: "post",
url:
Yep. Just realized that about ten minutes ago. dagnabbit! :o( Now I've
got to rewrite a bunch of code unless I can make this call
synchronous. Which at this late hour I'd rather do. Isn't there a way to
do that in jQuery?
Chris
Jörn Zaefferer wrote:
Christopher Jordan schrieb:
Hi fol
> I'm really confused why this isn't working. I need serious help... asap!
Hi Christopher,
You code isn't working because $.ajax is an asynchronous call. You
invoke it and give it a callback method (success). That callback
method is invoked whenever the server response is received. You need
to
Christopher Jordan schrieb:
> Hi folks,
>
> I have an ajax call that upon success has a variable 'r' that
> contains a JSON encoded string. I eval that string and it becomes an
> object (an array of structures, etc.), but when I try returning that
> object from the function to the caller, something
Hi folks,
I have an ajax call that upon success has a variable 'r' that
contains a JSON encoded string. I eval that string and it becomes an
object (an array of structures, etc.), but when I try returning that
object from the function to the caller, something goes wrong. The caller
says that the v