title: How to insert text into selected textbox in JavaScript without ID?
body: <p>Context:</p>
  
  <ol>
  <li>Writing a google chrome extension using JavaScript</li>
  <li>Using context menus library</li>
  <li>User should be able to right click into a textbox, select chrome extension, select "insert text", and then that text will get inserted into the selected text box.</li>
  <li>I am using pure javascript, please no jquery or AJAX.</li>
  <li>I am unable to edit the HTML page as it could be any generic web page with an HTML text box or editable field.</li>
  </ol>
  
  <p>Code I have so far:</p>
  
  <pre><code>//the menu item
      var menuItem_insert = chrome.contextMenus.create({"title": "Insert Timestamp", "contexts":[context], "onclick:": insertTimestamp}); 
  
  //the onclick
      function insertTimestamp(info, tab) {
        //if info.editable is true then
        alert(info.editable); //for debugging
  
      //CODE GOES HERE: need to insert timestamp here
      }
  </code></pre>
  
  <p>Question: 
  How do I insert text into a selected textbox for which I may not have the "ID" for?</p>