![]() |
Update frame by script - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Update frame by script (/showthread.php?tid=1341) |
Update frame by script - winamp - 18.04.2018 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/showthread.php?tid=1212&highlight=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(){ Best Regards RE: Update frame by script - admin - 18.04.2018 Try running code directly in browser console (F12): Code: $('.graph').find('iframe').attr('src', 'http://192.168.0.101/Tag1') Also check that selector is correct (this call should return 1): Code: $('.graph').find('iframe').length RE: Update frame by script - winamp - 18.04.2018 The second call returned 1 and this is the result from call 1, but the frame didn't update: Code: $('.graph').find('iframe').attr('src', 'http://192.168.0.101/Tag1') Well now it worked again after a while, but I didn't change anything. I just wanted to check if the script is correct, maybe it's a browser problem. If I discover why it didn't work I'll post it. Thank you anway. RE: Update frame by script - admin - 18.04.2018 Do you have "persistent" mode enabled for this frame? RE: Update frame by script - winamp - 18.04.2018 (18.04.2018, 09:46)admin Wrote: Do you have "persistent" mode enabled for this frame? I have it not enabled right now, but what would change if it's enabled? RE: Update frame by script - admin - 18.04.2018 Without persistent mode iframe is removed from plan once plan is not visible. With persistent mode enabled iframe is only created once. |