You should ignore that completely. This will not produce anything useful.
<img src="dummy.jpg" id="myImage"/>
var mySrc = 'http://www.mydomain.com/image.jpg';
document.getElementById('myImage').src = mySrc;
01-06-2011, 04:55 PM
But there is no image involved. I am basically trying to set the path to my other .js file in a somewhat dynamic way based on the current host name. Normally a relative path would obviously be the simplest way to do this but that presents problems on certain CMS pages so I was hoping to dynamically "hard code" the full path based on the host name.
Perhaps I need a different approach??
01-06-2011, 05:25 PM
if (location.hostname == "stage.mydomain.com")
01-06-2011, 05:30 PM