at first : I had problem to read image ina javascript like this:
var image = "/images/my_image.png"
so I try another way. But is this way of how to check the real path correct? Thank you for your comments.
var string = location.port;
var full_url = "";
if(string != ""){full_url = document.domain + ":" + string;}
else{full_url = document.domain;}
var image = "http://"+full_url+"/images/my_image.png"