How to format a dollar?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript">How can I format numbers as money in JavaScript?</a>  </p>
</blockquote>



<p>I am doing a divide and multiply to figure out the value of a field and the value looks like this</p>

<pre><code>$32560.000000000004.00
</code></pre>

<p>I am setting the value like this</p>

<pre><code>sq_footage = $("#sq_footage").val();
sq_footage_total = (((sq_footage / 36) * factor) * average )* 30;
if(factor != ""){
    $("#new_calc").val("$" + sq_footage_total + ".00");
}
</code></pre>

<p>Is there a way to format it like </p>

<pre><code>$32,560.00
</code></pre>
