[jQuery] How can I store data from an AJAX function in a json-array?

2009-11-07 Thread DigitalDude
Hey, I need to gather somer data for a jQuery function. I need this data to be a json array, which I will achieve in a php action which returns an array that is encoded as JSON. So far, so good. I need sth like this: $.ajax({

Re: [jQuery] How can I store data from an AJAX function in a json-array?

2009-11-07 Thread Michael Geary
You shouldn't be thinking in terms of storing the JSON data in a variable for other functions to use. Instead, you should *call* those other functions from your success callback, and pass the JSON data as an argument to those functions. Remember that Ajax calls are asynchronous (the A in Ajax).