Can't get Javascript to set text
<p>I see examples for this all over, but for some reason, mine isn't working. I have a textbox that is added dynamically if a certain value is selected in a select list.</p>

<p>The part where the field shows up is working, but I am also trying to add some text to the box, which I can't get to work. I'm also trying to use JS to select the text once it's entered - but haven't gotten that far yet!</p>

<p>Is there something blatantly wrong with this?</p>

<pre><code>function showBox() {
  if (document.getElementById("ctl00_Content_WhereFound").value == "Other" || document.getElementById("ctl00_Content_WhereFound").value == "Friend/Employee Referral") 
  {
    document.getElementById('ctl00_Content_WhereDetails').style.display = "inline";
    if (document.getElementById("ctl00_Content_WhereFound").value == "Other") {
      document.getElementById('ctl00_Content_WhereDetails').innerHTML += 'Enter Other';
    } else {
      document.getElementById('ctl00_Content_WhereDetails').innerText += "Enter Referral";
    }
  }
}
</code></pre>
