iFrame Reload Function with JavaScript

<a onclick="var ifr=document.getElementsByName('paint')[0]; ifr.src=ifr.src;" href="#xy"></a>
<script>
window.onload = function() {
    document.getElementById('iframeRefresher').addEventListener('click', function() {
        var ifr = document.getElementsByName('paint')[0];
        ifr.src = ifr.src;
    });
}</script>

Leave a Reply