I have an image url defined in my javascript code as:
var boxwidth = document.properties["sc:price"];
content += "<body align=\"center\"><font face= \"Comic sans MS\">";
content += "<b>Retail Price: </b>" + price + "<br><br>";
var urlStr = document.assocs["sc:relatedDocuments"][0].url;
//image document url
var res = "http://hostname:port/share/proxy/alfresco/api/node/content/"+urlStr.substring(4);
document.content = content;
I have to pass this as src attribute to an image:
content += "<img src=\"'+res+'\" width = \"65px\" height = \"35px\"/>";
Linking the url works this way:
var str = "View Image";
var result = str.link(res);
content += result+"<br><br>";
But I cannot see the image in HTML doc. Can anyone guide as to why it could be happening and what is the alternative?