How to insert an image on Pentaho dashboard with condition?

被刻印的时光 ゝ 提交于 2019-12-11 11:04:05

问题


I know how to insert an image using add image avaible on Layout Panel or using HTML.

However I want to make a condition : If the image is not avaible or doesn't exist, there is a default image I want to display.

So I think I need to do it with js function. What is the best way for it?


回答1:


you can use image tag in html for that.

 <img id="img" src="SomeImage.jpg" onerror="this.onerror=null; this.src=default.png" alt="" width="100" height="120">


来源:https://stackoverflow.com/questions/57678223/how-to-insert-an-image-on-pentaho-dashboard-with-condition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!