Re: [JSMentors] Variable scope/timing issue w/ ajax within a JavaScript module

2011-09-15 Thread Matthias Reuter
// Need these to be stuffed full of data! listHash[options.Alias] = hashTable; return listHash[options.Alias]; These two lines are executed within the callback function when the request finished. Where does the return value go to? Since it's an asynchronous request, the function that started

Re: [JSMentors] Variable scope/timing issue w/ ajax within a JavaScript module

2011-09-14 Thread Poetro
2011/9/14 Matthew Bramer remym...@gmail.com: So I've been building out a module to interact with an API.  This module is useful because it allows me to set defaults for the API and the flexibility to pass in custom instructions. Just out of curiosity why don't you use jQuery.extend if you use