title: Javascript Embedded Image Resources
body: <p>I am currently using embedded resources within a custom control. I have images embedded which are icons for navigation etc. However I need to be able to use these images within the embedded JavaScript to change the images depending on certain criteria.</p>
  
  <p>I know how to access embedded resources within c# asp.net pages, but not however within JavaScript.</p>
  
  <p>I have tried the following with no success.</p>
  
  <pre><code>document.getElementById('button1').src = "NAMESPACE.FOLDER/DIRECTORY.IMAGE.png";
  </code></pre>
  
  <p>I don't believe the JavaScript I have written is wrong, just how the image is accessed.</p>
  
  <p>I am not interested in alternatives with CSS /  C# code because it has to be done with JS.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks in advance.</p>