title: How to pass the chrome extension textbox value to browser textbox
body: <p>I am working on chrome extension where user will enter the value in the form (extension form) and clicking on the submit button the value should fill to the current browser tab form's textbox. but i am not able to pass the value </p>
  
  <p>here is the all details : 
  <strong>manifest.json</strong></p>
  
  <pre><code>{
    "name": "My First Extension",
    "version": "1.0",
    "manifest_version": 2,
    "description": "The first extension that I made.",
    "browser_action": {
      "default_icon": "icon.png",
      "default_popup": "popup.html"
    },
    "content_security_policy": "script-src 'self' https://ajax.googleapis.com; object-src 'self'",
    "permissions": [
        "tabs", "http://*/*"
      ],
      "content_scripts": [
        {
          "matches": ["*******weburl*********"],
          "js": ["jquery.js","content.js"],
          "run_at": "document_start"
        }
    ],
    "web_accessible_resources": ["inject.js"]
  }
  </code></pre>
  
  <p><strong>popup.html</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body style="width: 400px"&gt;
  &lt;div&gt;
    &lt;div&gt;Search Bookmarks: &lt;input id="search"&gt;&lt;/div&gt;
  &lt;input type="button" name="submit" value="submit" id="submit"&gt;
   &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>content.js</strong></p>
  
  <pre><code>(function (chrome) {
      var js = document.createElement('script');
      js.type = 'text/javascript';
      js.src = chrome.extension.getURL('inject.js');
     // document.getElementsByTagName('head')[0].appendChild(js);
  (document.head || document.documentElement).appendChild(js);
  }(chrome));
  </code></pre>
  
  <p>and here is my <strong>inject.js</strong> file</p>
  
  <pre><code>$(document).ready(function(){
      // alert('Here');
      $("#submit").click(function(){
          document.getElementById('email').value = 'REWRWRE';
      });
  })
  </code></pre>
  
  <p>The id email is my web url form's email address but it is not filling the value after click. if i just passed the value on load it is filling that field but not after the click.</p>
  
  <p>Thanks in advance!!</p>