How to replace a string url
<p>I have a string "D:\folder\image.jpg" and I want to change it to "<code>http://ip/VDrive/folder/image.jpg</code>".</p>

<p>I tried something like this:</p>

<pre><code>var str = "D:\folder\image.jpg";
str = str.replace("D:\\", "http://ip/VDrive/");
result = str.replace("\\", "/");
</code></pre>

<p>but it doesn't work. I'm edited the external js file directly from VS2008 I hope it has nothing to do with it.</p>

<p>Please help me with this.</p>
