title: Execute web page js from chrome extension content script
body: <p>I have this js function in my web page html code.</p>
  
  <pre><code>function update() {
      document.getElementById( "textbox ").value = updatetext;
  }
  </code></pre>
  
  <p>When I execute "update()" from chrome console, it works.<br>
  But if I execute from chrome extension,</p>
  
  <pre><code>chrome.tabs.executeScript(tab.id, {code: "update();"}, function(result){});
  </code></pre>
  
  <p>It says update is not defined. But if I replace with "alert('ok')", It works.<br>
  Then I execute</p>
  
  <pre><code>eval("update()")
  </code></pre>
  
  <p>in Chrome extension content script. It also says "update is not defined."</p>
  
  <p>So what can i do to call js function on web page?</p>