Looking for some advice to get my iframe source to refresh what is in the iframe. the source is changed by the link clicked to create the iframe content.
window.setInterval(function() {
var src = document.getElementById('frame').src; document.querySelector('iframe.reload').setAttribute('src', src);
}, 3000);
<section id="schedules">
<div class="container">
<script>
window.setInterval(function() {
var src = document.getElementById('frame').src;
document.querySelector('iframe.reload').setAttribute('src', src);
}, 3000);
</Script>
<li><a href="./schedules/1_monday.html" target="frame">Monday</a></li>
<li><a href="./schedules/2_tuesday.html" target="frame">Tuesday</a></li>
<li><a href="./schedules/3_wednesday.html" target="frame">Wednesday</a></li>
<li><a href="./schedules/4_thursday.html" target="frame">Thursday</a></li>
<li><a href="./schedules/5_friday.html" target="frame">Friday</a></li>
<li><a href="./schedules/6_saturday.html" target="frame">Saturday</a></li>
<li><a href="./schedules/7_sunday.html" target="frame">Sunday</a></li>
<iframe class="reload" name="frame" id="frame" frameborder="0" width="1200" height="700"></iframe>
</div>
</section>
scritp is refreshing to a blakc page, looking for src but im not sure how to label src of currently loaded iframe.