[jQuery] Re: How to pass variables between jQuery plugins?

2009-02-21 Thread Stephan Veigl
Hi Vic, the global anArray works fine see: http://jsbin.com/ukesa/edit The problem is that you have to wait until the ASYNCHRONOUS callback of your get() function has been called. 1) minor style remark You could declare anArray outside of the ready function with a var statement. This makes the

[jQuery] Re: How to pass variables between jQuery plugins?

2009-02-20 Thread Stephan Veigl
Hi Vic, I guess the problem is that get is an asynchronous function. So anArray exists outside of your get-callback function (since you use it as global variable) but the value is not set when the get function returns since your callback has not been executed yet. So whenever you access anArray

[jQuery] Re: How to pass variables between jQuery plugins?

2009-02-20 Thread Vic
Thanks Stephan for jumping in. anArray near the end of the callback function within $.get() now has the correct values I want from the csv file. I understand what you said about doing everything from the callback function. But in my case I have 3 csv files to open and I'd like to perform some