Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Variable scope in Javascript driving me nuts [SOLVED]



Philipp,

Thanks for responding.

Now you're telling jQuery to asynchronously POST the JSON data and call the function checkResult *when the request is finished*!
However, your outside function just continues immediately after this line. It doesn't wait for any result!

Dude... you just wrinkled my brain!

I get it now.

I thought that "asynchronous" in a web development context simply meant "doing stuff without reloading the web page". I didn't realize it meant "doing stuff even at the same time as other Javascript being executed".

Now that I grasp that asynchronous JSON posting happens *really* asynchronously, I have to alter my approach.

Thanks for setting me straight, and thanks to everyone else who posted helpful advice!

--
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links