title: Insert text in to Input Field using javascript
body: <p>I am trying to insert text in to an input field using <a href="http://www.scottklarr.com/topic/425/how-to-insert-text-into-a-textarea-where-the-cursor-is/" rel="nofollow">this code</a>.</p>
  
  <p>This is the code I am using:</p>
  
  <pre><code>&lt;input class="cid" type="text" name="c1" /&gt;
  &lt;input class="cid" type="text" name="c2" /&gt;
  &lt;input type="button" value="Insert Text" onclick="insertAtCaret('c1','TEXTTOINSERT1');insertAtCaret('c2','TEXTTOINSERT2');" /&gt;
  </code></pre>
  
  <p>But nothing is happening.
  I don't know JS so I'm not sure if the JS code I referenced before is only for textareas  which did work when I tested.</p>
  
  <p>Thanks!</p>