Reload a widget from a button


(Christophe) #1

Hello everybody!

I have a php widget (iFrame page) that recovers information from an external database whose content is permanently updated.

To reload that specific widget without reloading the scene, I have a button, within the scene but outside the widget itself. Could you help me with the javascript code or the custom behavior that I should attach to this button?


(Andrew) #2

You could use this:

document.getElementById('iframeID').contentWindow.location.reload();

But i have not tested it ?


(Christophe) #3

Thank you Andrew. Unfortunately, it does not work for me. I include a very basic test with a small javascript showing the iFrame loading time (should be different all the time, which allows to test if the iFrame reloading script is working)

iframereload.hype.zip (18.3 KB)