[jQuery] Re: returning variable from extension function

2008-02-18 Thread jquertil
thanks cherry for bumping this! and THANKS MIKE for pointing out the async aspect of $.get() I rewrote my function and now it works! For the benefit of others, there are soem add'l comments loadXML2array: function(url,variable) { // is an extension function, see original post above retu

[jQuery] Re: returning variable from extension function

2008-02-16 Thread Mike Alsup
What you have coded doesn't work because the $.get call is *asynchronous*. When you call $.get, $.post, $.ajax or any async function you pass a callback function. The actual $.get call returns immediately, but the results from the server aren't passed to your callback method until the server respo

[jQuery] Re: returning variable from extension function

2008-02-16 Thread [EMAIL PROTECTED]
jquertil, I am the least qualified person to answer you, but am disappointed that you haven't received any replies to either of your posts, so am bumping you up! I have this difficulty all the time -- and you're clearly more advanced than me. I *think* you need to create a namespace - which I **t