changing .innerHtml Property
<p>I am trying to changed the innerHtml property of a label in a js function to update values. I cannot seem to make this work as anticipated, any input would be great!</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
        &lt;title&gt;D&amp;D Attribute Generator&lt;/title&gt;
        &lt;link rel=stylesheet type="text/css" href="/style.css"&gt;
        &lt;script type="text/javascript"&gt;
            function roll()
            {
                var str = document.getElementById("strTB").value;
                var dex = document.getElementById("dexTB").value;
                var con = document.getElementById("conTB").value;
                var intt = document.getElementById("intTB").value;
                var wis = document.getElementById("wisTB").value;
                var cha = document.getElementById("chaTB").value;

                var array = [str || 0, dex || 0, con || 0, intt || 0, wis || 0, cha || 0];

                var results = new Array();
                var index = -1;
                var rollCount = 0;
                var i = 0;
                var len = array.length;
                for(i=0; i &lt; len; i++)
                {
                    var rollVal = Math.floor(Math.random() * 20 + array[i])
                    while (rollVal &lt; array[i]) 
                    {
                        rollVal = Math.floor(Math.random() * 20 + array[i])
                        i = 0;

                    }
                    results[i] = array[i];

                }
                document.getElementById("strLbl").innerHtml = "test";

                /*document.getElementById("dexLbl").innerHtml = ""+ results[1];
                document.getElementById("conLbl").innerHtml = ""+ results[2];
                document.getElementById("intLbl").innerHtml = ""+ results[3];
                document.getElementById("wisLbl").innerHtml = ""+ results[4];
                document.getElementById("chaLbl").innerHtml = ""+ results[5];*/
                alert(document.getElementById("strLbl"));
                return (false);
            }
        &lt;/script&gt;

    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id="mainDiv"&gt;
            &lt;div id="headTrans"&gt;&lt;/div&gt;
            &lt;div id="headBox"&gt;
                &lt;h1&gt;D&amp;D Attribute Generator&lt;/h1&gt;
            &lt;/div&gt;
            &lt;div id="bodyTrans"&gt;&lt;/div&gt;

                &lt;div id="BodyBox"&gt;
                    &lt;table id="formTbl" cellpadding="5px"&gt;
                            &lt;tr&gt;
                                &lt;th&gt;Attribute&lt;/th&gt;
                                &lt;th&gt;Min Value&lt;/th&gt;
                                &lt;th&gt;Exc %&lt;/th&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Strength&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="strTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="strExcTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Dexterity&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="dexTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Constitution&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="conTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Intelligence&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="intTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Wisdom&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="wisTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;Charisma&lt;/td&gt;
                                &lt;td id="minValCell"&gt;&lt;input type="text" id="chaTB" maxlength="2" size="3" /&gt;&lt;/td&gt;
                                &lt;td&gt;&lt;b&gt;&lt;input type="button" id="rollBtn" value="   Roll   " onclick="return roll()" /&gt;&lt;/b&gt;&lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                        &lt;hr size="2" width="85%"&gt;
                        &lt;h2&gt;Results&lt;/h2&gt;
                        &lt;label id="strLbl"&gt;Strength: &lt;/label&gt;&lt;br&gt;
                        &lt;label id="dexLbl"&gt;Dexterity: &lt;/label&gt;&lt;br&gt;
                        &lt;label id="conLbl"&gt;Constitution: &lt;/label&gt;&lt;br&gt;
                        &lt;label id="intLbl"&gt;Intelligence: &lt;/label&gt;&lt;br&gt;
                        &lt;label id="wisLbl"&gt;Wisdom: &lt;/label&gt;&lt;br&gt;
                        &lt;label id="chaLbl"&gt;Charisma: &lt;/label&gt;&lt;br&gt;
                &lt;/div&gt;
                &lt;div id="rollCountBox"&gt;&lt;label id="rollCountLbl"&gt;Roll Count: 0&lt;/label&gt;&lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
