title: chrome extension OnMessage
body: <p>I'm a newbie at Chrome extensions, and of course I stuck on every step, but this is specially hard. Maybe it is a silly mistake, but here is what I am trying to do: </p>
  
  <p>Send a simple message from the content script to the background page and handle it as a variable. So I have this in my content script:</p>
  
  <pre><code>$(document).ready(function() { 
      var d = document.domain;    
         chrome.extension.sendMessage({dom: d});  
  
   });
  </code></pre>
  
  <p>And in my background script this:</p>
  
  <pre><code>chrome.extension.onMessage.addListener(function(request) {
      alert(request.dom);
  });
  </code></pre>
  
  <p>So, the alert works fine. But it "goes" to the page I am browing and not the HTML extension, this means, instead of poping up when clicking on my extension button, it will appear as it was coded into the content script when the page loads.</p>
  
  <p>Please, any help would be appreciated.</p>