Retrieving callback value from calling function. How to?
<p>In a function I make an ajax call, the call back has the response_text I need in that function.  I tried the obvious of putting a <code>var here</code> in the calling function and using it in the callback function.  This does not work.  Next I tried using a <code>function out()</code> which is how I've done this before.  This works as I can now access response_text from out().  However, is there a way to access from <code>vOrb()</code> directly, that is, the original calling function?</p>

<p>I don't want to place all the code in the call back as in this <a href="http://stackoverflow.com/questions/6784702/retrieving-value-from-javascript-callback-function">SO Question</a></p>

<p>Would the module pattern work as a way to keep <code>var here</code> in scope when the callback function make its asynchronous return? Or would simply writing <code>var vOrb = function(){}</code> as a wrap and call using new, do the trick?</p>

<pre><code>function vOrb( icon_array )
{
    var here; // does not work
    function out( here ){} // does work
    new AjaxRequest().invoke( 'ajax_type=fav_dir', function( response_text )
    {
        out( response_text );
    } ); 

// want response_text here
</code></pre>
