18.04.2018, 07:54
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:
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
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);
}
});
Best Regards