changing content of p element using innerHTML
<p>I have the following script:</p>

<pre><code>var before = document.getElementById('before');    
if (switchElement.value == 'single'){
    for (var i=0; i &lt; before.length; i++) {
        if (before[i].id == "before_label") {
            before[i].innerHTML = 'Image';
            break;
        }
    }
    after.style.display = 'none';   
} 
</code></pre>

<p>and the HTML looks like:</p>

<pre><code>&lt;div id="before"&gt;
    &lt;p id="before_label"&gt; Before Image: &lt;/p&gt;
    &lt;input type="file" name="before"  size="40"&gt;
    &lt;input type="hidden" name="MAX_FILE_SIZE" value="10000000"&gt;
&lt;/div&gt;
</code></pre>

<p>Was wondering why it didn't work and change the inner html to change?</p>
