How can I get the alert box to show total from dropdown selections?
<p>I've made an error in this script and the alert box doesn't calculate the total, can anyone help please?
The alert box just shows 0 but I need it to total the value of the 2 dropdown selections</p>

<pre><code>&lt;head&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;title&gt;Sandbox&lt;/title&gt;
&lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
&lt;style type="text/css" media="screen"&gt;
body { background-color: #fff; font: 16px Helvetica, Arial; color: #fff; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;select id="t_dermal_name"&gt;
&lt;option value="t_default_dermal"&gt;-- Choose --&lt;/option&gt;
&lt;option value="1" rel="30"&gt;Between Eyebrows&lt;/option&gt;
&lt;option value="7" rel="30"&gt;Individual Line Softening&lt;/option&gt;
&lt;option value="2" rel="30"&gt;Lip Contouring&lt;/option&gt;
&lt;/select&gt;
&lt;select id="t_wrinkle_name"&gt;
&lt;option value="t_default_wrinkle"&gt;-- Choose --&lt;/option&gt;
&lt;option value="1" rel="30"&gt;Between Eyebrows&lt;/option&gt;
&lt;option value="7" rel="30"&gt;Individual Line Softening&lt;/option&gt;
&lt;option value="2" rel="30"&gt;Lip Contouring&lt;/option&gt;
&lt;/select&gt;
&lt;br /&gt;
&lt;button id="btn1"&gt;click&lt;/button&gt;
&lt;script&gt;
 $(document).ready ( function () {
    $("#btn1").click ( function () {
      var resultVal = 0.0;
      var objRegExp = '\s+';
       $(".test").each ( function() {
            resultVal += parseFloat ( $(this).val().replace(/\s /g,'').replace(',','.'));
        });
        alert ( resultVal );  
    });
});

&lt;/script&gt;
&lt;script src="/js/render/edit.js"&gt;&lt;/script&gt;
&lt;script&gt;var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')&lt;/script&gt;&lt;/body&gt;

&lt;/html&gt;
</code></pre>
