title: Using eval() to run HTML code
body: <p>I am trying to do a "Try-it yourself" editor but without using frames. 
  So I added 2 textareas, one for code and one to show the result. I also added a "Run" button.
  I wrote the following function to execute the code in the first text area and show the result in the second text area:</p>
  
  <pre><code>function RunCode() {
  var Code= document.getElementById('code').value;
  document.getElementById('result').innerHTML= eval(Code);
  }
  </code></pre>
  
  <p>But all i get in the result text area is : undefined.
  Sorry for my stupid questions but I am really a beginner. So: </p>
  
  <ul>
  <li><p>Does the eval function works only on javascript code?</p></li>
  <li><p>Is it right to do the result part as a text area?</p></li>
  </ul>