[jQuery] Re: returning an object array to a JS function - doesnt work

2008-02-14 Thread jquertil
thanks! I guess that makes sense.

[jQuery] Re: returning an object array to a JS function - doesnt work

2008-02-13 Thread Dave Methvin
The loadXMLarray() is trying to return objectArray before the callback in $.get() has finished. You probably need to use a callback for loadXMLarray as well. Also, you are defining objectArray as a global variable since it doesn't have var in front of it. That is probably a bad idea.

[jQuery] Re: returning an object array to a JS function - doesnt work

2008-02-13 Thread J Moore
you can't return a value from an anonymous function! think about it: you call $.get() and pass in an anon function as a parameter. $.get() returns basically immediately, and then sometime later (much later) your anon function will be called. Where does the return value of anon go? Nowhere.