
I have an HTML code which should display an image on a form after loading it but currently its not.
My code looks like
*This post is locked for comments
I have the same question (0)1) window.parent.document.getElementById("customerAssetImage").src = imageUrl;
This is useful when you want to set the src of img control in parent window. In this case your HTML page should be embedded/part of another page. This is not applicable for you.
2) Xrm.Page.getAttribute("customerAssetImage").src = imageUrl;
Xrm syntax is for CRM only context. This syntax will never work as there is no img control in CRM. Only iframe url can be set like this.
Solution: You should try this syntax because you are setting img url within same window.
document.getElementById("customerAssetImage").src = imageUrl;