JavaScript issue in IE when adding numbers
<p>I have a simple form, with 5 textboxes and 3 answers (also textboxes). The form calculates a result for the user with number inputs. My problem is my calculation does not work in IE, but works fine in both Chrome and Firefox. </p>

<p>What's wrong?</p>

<p>Here is my function: </p>

<pre><code>function addNumbers()
{
    var val1 = Number(document.getElementById("value1").value);
    var val2 = Number(document.getElementById("value2").value);
    var val3 = Number(document.getElementById("value3").value);
    var val4 = Number(document.getElementById("value4").value);
    var val5 = Number(document.getElementById("value5").value);
    var val6 = '100';
    var ansD1 = document.getElementById("answer1");
    ansD1.value = Number((val1 * val2) * (val4 / val6));
    var ansD2 = document.getElementById("answer2");
    ansD2.value = Number((val1 * val3) * (val5 / val6));
    var ansD3 = document.getElementById("answer3");
    ansD3.value = Number (ansD1.value - ansD2.value);
}
</code></pre>
