Converting Strings to Integer and get the persentage of two number
<p>What I'm trying to do is to make a progress bar for donation. My html structure is:</p>

<pre><code>&lt;div class="hgoal" style="text-align: center;"&gt;My goal is to raise $&lt;span id="mygoal"&gt;9,999.00&lt;/span&gt;&lt;/div&gt;
&lt;div class="donation-total"&gt;Total Donation&lt;span id="total-donation"&gt;1,000.00&lt;/span&gt;&lt;/div&gt;
</code></pre>

<p>my javascript so far is to get the innerHTML value of mygoal and total-donation.</p>

<pre><code>var mygoal = document.getElementById("mygoal").innerHTML;
var totalgoal = document.getElementById("total-donation").innerHTML; 
</code></pre>

<p>and I'm getting this as a result:</p>

<pre><code>mygoal = "9,999.00";
total-donation = "1,000.00";
</code></pre>

<p>I believe this is a string and not an integer, and using <code>parseInt()</code> only give me the first digit number.</p>

<p>Can anyone give me an idea how can I make this into an integer that can use for computation? example:</p>

<pre><code>mygoal + total-donation = 10,999.00
</code></pre>

<p>And also, any idea how can i get the percentage of this two varible?</p>