title: Javascript function return src path
body: <p>I'm trying to set an  'src' by calling a javascript function that returns the path like so:</p>
  
  <pre><code>&lt;img src="getImagePath()" /&gt;
  </code></pre>
  
  <p>the function:</p>
  
  <pre><code>function getImagePath(){
  
       return "images/image1.png";
  
  }
  </code></pre>
  
  <p>But it doesn't seem to work. Anything I'm missing? Thanks to anyone pointing me in the right direction.</p>