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.

Update frame by script
#1
Hi all,

I want to update a frame in my visualization by a script if a new external graph is created.
I found this thread https://forum.logicmachine.net/showthrea...ght=iframe and tried to change it for my case (static url), although I'm new to JavaScript. I created a new group address '1/1/2' and if a 'true' is sent, the frame should be updated. Also I added the additional class 'graph' to my frame. This is the script, but it somehow it only worked yesterday, not now:
Code:
$(function(){
  if (typeof grp != 'undefined') {
    grp.listen('1/1/2', function(object, state) {
      $('.graph').find('iframe').attr('src', 'http://192.168.0.101/Tag1')
    }, true);
  }
});
I also tried to change the datatype of '1/1/2' and the value of it manually, but it didn't update. Is there something wrong with the script or settings of my homeLYnk? Because yesterday it worked.

Best Regards
Reply


Messages In This Thread
Update frame by script - by winamp - 18.04.2018, 07:54
RE: Update frame by script - by admin - 18.04.2018, 08:18
RE: Update frame by script - by winamp - 18.04.2018, 08:46
RE: Update frame by script - by admin - 18.04.2018, 09:46
RE: Update frame by script - by winamp - 18.04.2018, 11:09
RE: Update frame by script - by admin - 18.04.2018, 11:13

Forum Jump: