Hi. I am trying to create my first extension for personal use. It is quite simple (in theory at least), but I am having a problem with message passing.

In short, the goal is to create an extension that will display the meta tags of the currently loaded page, in a popup. Here is my code so far.

popup.html
Code:
<html>
<head>
<script src="js/jquery.js"></script> 
<script type="text/javascript"> 
	function init() {
		var tabinfo = chrome.extension.getBackgroundPage().getData();
		$("body").append( "<div id='ad_seo_inner'><h1>Details for " + tabinfo[0].details + "</h1>" + tabinfo[0].details + "</div>" );
	}
</script> 
 
</head> 
<body onload="init()"> 
	<div id='about'>META SEO inspector</div> 	
</body> 
</html>
background.html
Code:
<html>
<head>
<script>
	var tabinfo = {};
	tabinfo[0] = {"details": "tester"};
	
	function getData() {
		chrome.tabs.getSelected(null, function(tab) {
			chrome.tabs.sendRequest(tab.id, {greeting: "hello"}, function(response) {
				console.log(response.farewell);
				tabinfo[0] = {"details": response.farewell};
			});		
		});
		return tabinfo;		
	}	
</script>
</head>
<body>
</body>
</html>
content.js
Code:
chrome.extension.onRequest.addListener(
  function(request, sender, sendResponse) {
    console.log(sender.tab ?
                "from a content script:" + sender.tab.url :
                "from the extension");
    if (request.greeting == "hello")
      sendResponse({farewell: "goodbye"});
    else
      sendResponse({}); // snub them.
  });
The popup itself is working, but i would have expected the getData function to overwrite the value of tabinfo[0] with the response from the content.js file (i.e. "goodbye". However, the originally declared tabinfo[0] is being displayed.

Can anyone point me in the right direction?