Refresh iframe when widget opens - 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: Refresh iframe when widget opens (/showthread.php?tid=788) |
Refresh iframe when widget opens - Mirco - 16.05.2017 Hi, I have a widget that contains an iframe, inside this iframe I have a table that contains some data. Depending on the status of some variables, when I open the widget, the content of the table inside the iframe must change. Now I don't want to set the refresh option of the iframe to 1 second, I only want that it will be refreshed only at the opening of the widget. Do you have some ideas? Thanks! RE: Refresh iframe when widget opens - buuuudzik - 16.05.2017 Probably it would be good for your app when your data would be updated very 1s, but you don't want refresh whole html You can prepare html(.lp file which generates html) with javascript which refresh only data in the table not whole html. RE: Refresh iframe when widget opens - Mirco - 16.05.2017 With an event script I create a file that contains the HTML code for the table. This HTML code is update, but the iframe not.. RE: Refresh iframe when widget opens - admin - 16.05.2017 In RC1 iframes are loaded only when visible and unloaded when hidden, unless persistent option is set. This should do the trick for you. RE: Refresh iframe when widget opens - Mirco - 16.05.2017 it doesn't work I have HL firmware v 2.0.. RE: Refresh iframe when widget opens - admin - 16.05.2017 Are you loading html or lp page? It might be cached, check browser dev tools. RE: Refresh iframe when widget opens - Mirco - 16.05.2017 I tryed both extension with same results.. If I wait more then 10 seconds it work as it should, but if wait less than this time it doesn't work.. RE: Refresh iframe when widget opens - Mirco - 17.05.2017 SOLVED! I had to add the timestamp at the end of the url of the iframe, so the browser don't take the page in the cache! RE: Refresh iframe when widget opens - admin - 17.05.2017 Just tested this with .lp and it's not cached at all. |