Javascript replaceAll not working
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript">Replacing all occurrences of a string in javascript?</a>  </p>
</blockquote>



<p>I need to replace all the string in an variable.</p>

<pre><code>&lt;script&gt;
var a="::::::";
a = a.replace(":","hi");
alert(a);
&lt;/script&gt;
</code></pre>

<p>Above code replaces only first string i.e..<code>hi::::::</code></p>

<p>I used <code>replaceAll</code> but its not working.</p>

<p>Please guide me, thanks</p>
