Mike...
The reason I was moving in that direction was that I needed the
results of the $,get call immediately after it ran. I was using in
conjunction with jEditable as a function call and I had to return the
string that $.get got back from the server to jEditable.
Sadly, I'm going to have to pu
No offense taken Mike. Andy and I were pounding our heads trying to
figure out why the value wasn't appearing so by using the synchronous
call, I was able to figure out that the variable outside of the $.get()
callback was indeed being filled.
You're right, though, that a synchronous call sh
Rey, no offense, bud, but synchronous ajax is a last resort. It freezes the
browser while the ajax data is loaded. You don't want to use it unless
you're certain that it's necessary - and that is rare.
Andy, the real question is what you want to do. Scope is not a problem: You
can easily assign
Hey Andy,
I found out what's happening. You are in fact updating the var but
$.get() being an async method, will take longer to complete than the
rest of the JS script. Here's a small example:
$(document).ready(function() {
foo = 'test 1';
$.get("module.cfm", function(resu
Andy,
I kept at it and I found this:
$(document).ready(function() {
foo = 'test 1';
foo = $.ajax({
url: "module.cfm",
async: false
}).responseText;
alert( foo );
});
It worked for me by setting the value of foo from the actu
5 matches
Mail list logo