Display JS Calculation Sum In An Input Field
<p>I want to display the sum of this calculation in an input field:</p>

<pre><code>function calculateSum1() {
    var sum = 0;
    //iterate through each textboxes and add the values
    $("input.miles").each(function() {
        //add only if the value is number
        if(!isNaN(this.value) &amp;&amp; this.value.length!=0) {
            sum += parseFloat(this.value);
        }
    });
    $("input.summiles").value(sum);
}
</code></pre>

<p>input field:</p>

<pre><code>&lt;input class="summiles" type="text" value=""&gt;
</code></pre>

<p>It works fine if I display it in a span, but I can't seem to get it to display in an input field.  Any ideas?  Thanks!</p>
