title: Working between Popup and Background Chrome Extension
body: <p>I am trying to set a variable in  popup window, labeled <code>i</code> and then send it to the background page. I believe that I can put the variable in as the "request", but I might be wrong about that. When I try to run the extension I get:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot call method 'sendRequest' of undefined</p>
  </blockquote>
  
  <p>What am I missing?</p>
  
  <p>Here is my popup.html file:</p>
  
  <pre><code>var i = 0;
  function start(){
      alert("working");
      chrome.tabs.sendRequest(i);
  }
  
  function add(){
      i++;
      document.getElementById('box').value=i;
  }
  
  function sub(){
      i--;
      document.getElementById('box').value=i;
  }
  </code></pre>