javascript callback not working
<p>I have a code like this</p>

<pre><code>function SocialMiner()     
{
    var verbose=true;
    var profileArray=new Array();
    var tabUrl;
    this.getTabUrl=function(callback)
    {
        chrome.tabs.getSelected(null, function(tab)
        {
            myUrl = tab.url;
            console.log("0"+tab.url);
            console.log("calling callback");
            callback.call(tab.url);

        });
    }    

    this.setTabUrlValue=function(pageUrl)
    {
        console.log("1"+pageUrl);
        tabUrl=pageUrl;
    }
};
</code></pre>

<p>I call the first method with second as callback</p>

<pre><code> var pageUrl=miner.getTabUrl(miner.setTabUrlValue);
</code></pre>

<p>What I observe is that , second function does not receives the value, i.e. pageUrl is undefined, however it was correctly passed in first function. Any pointers ?</p>
