Dashticz / dashticz_v2

Alternative dashboard for Domoticz
107 stars 62 forks source link

Buttons: Refresh of the iframe generates errors #355

Closed lokonli closed 5 years ago

lokonli commented 6 years ago

See https://www.domoticz.com/forum/viewtopic.php?f=67&t=17427&start=420#p185096

If a button is defined with: buttons.buienradar = {width:12, isimage:true, image: 'https://api.buienradar.nl/image/1.0/RadarMapNL?w=285&h=256', url: 'https://www.buienradar.nl'} then an iframe is being created. This iframe is refreshed with source https://www.buienradar.nl. The iframe normally is not visible. This seems to result in errors reported by buienradar.

How to fix? A possibility is to create (and show) the iframe only after clicking on the button. Loading will take some more time, but the errors are prevented.

I've prototyped this and it seems to work for buienradar. I can make the PR, but that will be in August.

Other proposals?