This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Change image from Url
#2
Hi,

Yes you can do that (off course) (:

Add a image to your visu with a default remote URL and give it a additional class 'dynamic', add a 250 byte object that holds the dynamic URL, in this sample '1/1/1' and add this to your custom JS:
Code:
$(function(){
  if (typeof grp === 'object') {
    grp.listen('1/1/1', function(obj, state) {
      $('.dynamic').find('img').attr("src", obj.value)
    },true);
  }
});
BR,

Erwin
Reply


Messages In This Thread
Change image from Url - by DGrandes - 01.02.2020, 14:48
RE: Change image from Url - by Erwin van der Zwart - 01.02.2020, 15:29

Forum Jump: