title: How do I replace text inside a div element?
body: <p>I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.</p>
  
  <pre><code>&lt;div id="panel"&gt;
    &lt;div id="field_name"&gt;TEXT GOES HERE&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's what the function will look like:</p>
  
  <pre><code>function showPanel(fieldName) {
    var fieldNameElement = document.getElementById('field_name');
    //Make replacement here
  }
  </code></pre>