Change the label of an input field based on dropdown list
<p>I'm trying to update the text label on an input field based on the selection in a dropdown list.</p>

<p>The field label below by default reads "Mean." I'd like it to be replaced by "Lower bound" if option 2 is selected.</p>

<pre><code>&lt;simpleLabel for="distLabel"&gt;Prior distribution, &lt;i&gt;CFR&lt;/i&gt;:&lt;/label&gt;
&lt;select id="priorCFRDistType" onchange='changePriorDistType();'&gt;
&lt;option value="1"&gt;beta&lt;/option&gt;
&lt;option value="2"&gt;uniform&lt;/option&gt;
&lt;/select&gt;
&lt;p&gt;
&lt;simpleLabel for="cfr_1"&gt;Mean:&lt;/label&gt;
&lt;input id="cfr_1" type="text" value ="0.05" /&gt;
</code></pre>

<p>In my <code>.js</code> file, I have <code>changePriorDistType()</code>. It currently does a lot of stuff under the hood. How do I get it to update the text field? This is what I've tried so far:</p>

<pre><code>function changePriorDistType() {
    menuItem = document.getElementById("priorCFRDistType");
    priorCFRDistType = menuItem.options[menuItem.selectedIndex].value;
    if ( priorCFRDistType == 2 ) {
       var tmpThing = document.getElementById("cfr_1").innerText;
       tmpThing = "Lower bound";
    }
}
</code></pre>

<p>This doesn't work. I'm clearly new to Javascript and HTML, so nothing's too obvious to point out. Thanks.</p>
