JavaScript replace method doesn't working properly
<p>I have to replace the value that comes in [CATALOOK]  from cart. I have<br>
use  replace method but still its same and showing error.</p>

<pre><code>var compare_value_old="$125";
var compare_value_new=parseFloat(compare_value_old.replace.('/[^0-9-.]/g'));

if (parseFloat([CARTTOTAL].replace('/[^0-9-.]/g')) &gt; compare_value_new)
{ 
  // do something here..
 }   
</code></pre>

<p>but Aafter using this replace method still its not replacing $,.  please suggest<br>
 me any solution</p>

<pre><code>if(parseFloat($3,974.81.replace('/[^0-9-.]/g')) &gt; compare_value_new) 
</code></pre>

<p>i got this in page soruce...its not removing $,. they are still there..showing error 
$3 is not defined.</p>
