hi guys.. I am new to the chrome plugin devlopment. And I am using the content script. but i am facing problems.
see if you guys can help me ...

I have my content script as follows
Code:
alert("content script");
var port = chrome.extension.connect();
port.onMessage.addListener(function(data) {
  alert("inside listener");
});
alert("End");
and my toolstrip.html as following.
Code:
<div class="toolstrip-button" onclick='test();'>
  
  <span>Click</span>
</div>
<script>
function test() {

chrome.self.onConnect.addListener(function(port) {
  port.onMessage.addListener(function(data) {
	
  });
  port.postMessage({message: "Hi", values: [true]});
});

}
</script>
The json file is as sollowing..
Code:
{
  "name": "My First Extension",
  "version": "1.0",
  "description": "The first extension that I made.",
  "toolstrips": [ "my_toolstrip.html" ],
   
   "content_scripts": [
    {
      "js": ["foo.js" ], 
      "matches": ["http://*/*" ]
    }
	]
}
Now I was hoping that when I will click on the "Click" button the third alert box "inside listener" will appear, But i am not able to see it.. can you guys help me finding our what the hell I am doing wrong.