Multiple variable in value
<p>I'm just learning JavaScript. What I am doing at the moment is on my contact form trying to pass values.</p>

<pre><code>function calculate(){
    var dr1=document.getElementById('numimg');
    var resultdrop=document.getElementById('total');
    resultdrop.value=0;
    resultdrop.value=parseInt(resultdrop.value);
    for(i=0;i&lt;dr1.length;i++)
        if(dr1.options[i].selected)
            resultdrop.value=parseInt(resultdrop.value)+parseInt(dr1[i].value);
}
</code></pre>

<p>And this is all working fine. Problem appears if with more than one variable that i want to pass to resultdrop.value</p>

<pre><code>var dr1=document.getElementById('numimg');
var dr2=document.getElementById('numimg1');
</code></pre>

<p>Not sure how to sort this out. Can anyone help me please?</p>
