JavaScript string replace is not working
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6429321/javascript-replace-function-not-working">javascript replace function not working</a>  </p>
</blockquote>



<p>Here is my JS code:</p>

<pre><code>var imgTitle = "fizz";
var imgTitle2 = "fizz";
var imgInfo = "buzz";
var imgSrc = "foo";
var liHTML = "&lt;li class='imgThumbLi ui-draggable' title='IMG_TITLE'&gt;&lt;img class='image' src='IMG_SRC' title='IMG_TITLE'/&gt;&lt;div class='imageInfo'&gt;&lt;p class='detailTitle'&gt;IMG_INFO&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;";

// Search and replace all dummy values.
liHTML.replace("IMG_TITLE", imgTitle);
liHTML.replace("IMG_TITLE2", imgTitle2);
liHTML.replace("IMG_SRC", imgSrc);
liHTML.replace("IMG_INFO", imgInfo);

alert(liHTML);
</code></pre>

<p>Getting this for print out:</p>

<pre><code> &lt;li class='imgThumbLi ui-draggable' title='IMG_TITLE'&gt;&lt;img class='image' src='IMG_SRC' title='IMG_TITLE'/&gt;&lt;div class='imageInfo'&gt;&lt;p class='detailTitle'&gt;IMG_INFO&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
</code></pre>

<p>(Same as before the string replace calls). In Firebug I'm getting an error stating:</p>

<blockquote>
  <p>c.replace is not a function</p>
</blockquote>

<p>Get this error anytime the code snippet above executes. <strong>Why isn't this string replace working?!?!</strong> Thanks in advance!</p>
