title: Chrome Extension - edit a text field
body: <p>I'm trying to write my first Chrome extension. It would, when clicked, automatically fill the fields of an ID and password for my University's login page (which has its form's auto-fill disabled).
  It's a very specific page.</p>
  
  <p>I have a few problem.
  I've searched Google and SO but couldn't find an explanation on how to change the value of a text field through Chrome. I know how to do this in HTML and JavaScript, however I couldn't get the proper input to modify its text.</p>
  
  <p>I've also tried using jQuery using a few examples I've found, but no luck.
  I have an HTML page (popup.html) which calls a JavaScript file.
  I've also tried placing the JS in a content script</p>
  
  <p>Here's the manifest.json:</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"
    },
    "permissions": [
        "tabs", "http://*/*"
      ],
      "content_scripts": [
        {
          "matches": ["http://*/*"],
          "js": ["jquery-1.7.2.min.js","content.js"]
        }
    ]
  }
  </code></pre>
  
  <p>One of my attempt of popup.js (which gets called from popup.html) is:</p>
  
  <pre><code>chrome.tabs.getSelected(null, function(tab) {
      console.log(document)
  });
  </code></pre>
  
  <p>I've also tried placing this code inside the content.js. same result,
  It prints to console, however it prints the popup.html content..</p>
  
  <p>I've also tried directly (and from the above method) to access an element directly by <code>document.getElementById()</code> but still no luck..</p>
  
  <p>So,
  Can anyone tell me what I'm doing wrong?</p>