Refresh HTML panel on auto-refresh

Within my dashboard I have a HTML panel, which I want to auto refresh every time the dashboard refreshes. In release 5.3.4, I achieved this with the following code:

   <div id="myTextPanel" class="ng-scope">
     <script type="text/javascript">
       function refreshMyPanel() {
         // SOME FUNCTION THAT GENERATES TableHolder
       }
       $(document).ready(function() {
         refreshMyPanel(); // For the initial load of data
         // Refetch data every time the "refresh" event is broadcast
         angular.element('#myTextPanel').injector().get('$rootScope').$on('refresh', function() {refreshMyPanel();});
        });
       </script>
       <p id="TableHolder"></p>
    </div>

However, since release 5.4 this is no longer working. What has happened in the new release that this is no longer working or is there an alternative solution?

Any updates or solutions for this yet? I’m facing the same problem!

Anyone on this? Can’t get it work. Tried also to reload an iframe but still didn’t work.

which html panel are you using?

The TEXT Panel. This is the code I’m using:
left off the first < otherwise can’t get the code :slight_smile:

script type=“text/javascript”>

// set your interval in milliseconds

var reloadInterval = 5000;

// this will run when the document is fully loaded

function init() {

setTimeout(‘reload()’',reloadInterval);

}

// this reloads the iframe, and triggers the next reload interval

function reload() {

var iframe = document.getElementById(‘reloader’);

if (!iframe) return false;

iframe.src = iframe.src;

setTimeout(‘reload()’',reloadInterval);

}

// load the init() function when the page is fully loaded

window.onload = init;

I’ve tried now the HTML Panel and can get the page to display. Bust still no auto-refresh.