title: How can I read a tinymce textarea that's edited?
body: <p>My input texts work fine when i click the 'Edit HTML Below then Click Display' button, but my tinymce textareas won't work when I <em>edit</em> them.  They'll send it's old value to the iframe, but not the new value.  How can I send the new values when I edit the tinymce textareas?  Here's the jsfiddle: <a href="http://jsfiddle.net/Ms3NG/1/" rel="nofollow">http://jsfiddle.net/Ms3NG/1/</a> and code below:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function init(buttonid, name, iframeid) {
      document.getElementById(buttonid).addEventListener('click',function() {
  //        this.style.backgroundColor = '#cc0000';
        gJSL_displayInput(name, iframeid)
      },false);
      gJSL_displayInput(name, iframeid);
  }
  
  window.onload = function() {
  init('thisButton','test','iframetest');
  init('thisButtona','testa','iframetesta');
  init('thisButtonb','testb','iframetestb');
  }
  
      function gJSL_displayInput(nameInput, idOutput) {
  
          var loc = "::JSLearning::gJSL_displayInput()";
          try {
              var ifrm = document.getElementById(idOutput);
              var cnt = (ifrm.contentWindow || ifrm.contentDocument);
              var doc;
              doc = cnt.document;
              doc.open();
              var inputs = document.getElementsByName(nameInput);
              for(var i = 0; i &lt; inputs.length; i++) {
                  doc.write(inputs[i].value + "&lt;br /&gt;");
              }
              doc.close();
          } catch (e) {
              exceptionAlert(loc, e);
          }
      }
  &lt;/script&gt;
  
  &lt;script src="//tinymce.cachefly.net/4.0/tinymce.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
          tinymce.init({selector:'textarea'});
  &lt;/script&gt;
  
  &lt;div class="scrollbar"&gt;
  &lt;input id="test1" name="test" value="ajkla;ldkfj"&gt;
  &lt;input id="test2" name="test" value="bla2"&gt;
  &lt;input id="test3" name="test" value="bla3"&gt;
  &lt;input id="test4" name="test" value="bla4"&gt;
  &lt;input id="test5" name="test" value="bla5"&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;textarea class="ckeditor" id="test6" name="test"&gt;&lt;/textarea&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;input id="test7" name="test" value="bla7"&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;textarea id="test8" name="test"&gt;HELLO WORLD&lt;/textarea&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;textarea id="test9" name="test"&gt;HI EVERYBODY&lt;/textarea&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;input id="thisButton" type="button" name="Display" value="Edit HTML Below then Click to Display"/&gt;
  &lt;/div&gt;
  
  
  &lt;div class="scrollbar"&gt;&lt;iframe id="iframetest" src="" style="background: White;"&gt;&lt;/iframe&gt;&lt;/div&gt;
  </code></pre>