title: Reload source of IFrame, Iframe changes source from link clicked
body: <p>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.</p>
  
  <p>window.setInterval(function() {</p>
  
  <p>var src = document.getElementById('frame').src;
    document.querySelector('iframe.reload').setAttribute('src', src);</p>
  
  <p>}, 3000);</p>
  
  <pre><code>&lt;section id="schedules"&gt;
      &lt;div class="container"&gt; 
  
  &lt;script&gt;
      window.setInterval(function() {
  
        var src = document.getElementById('frame').src;
        document.querySelector('iframe.reload').setAttribute('src', src);
  
      }, 3000);
  
  
  &lt;/Script&gt;
  
      &lt;li&gt;&lt;a href="./schedules/1_monday.html" target="frame"&gt;Monday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/2_tuesday.html" target="frame"&gt;Tuesday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/3_wednesday.html" target="frame"&gt;Wednesday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/4_thursday.html" target="frame"&gt;Thursday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/5_friday.html" target="frame"&gt;Friday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/6_saturday.html" target="frame"&gt;Saturday&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="./schedules/7_sunday.html" target="frame"&gt;Sunday&lt;/a&gt;&lt;/li&gt;              
  
      &lt;iframe class="reload" name="frame" id="frame" frameborder="0" width="1200" height="700"&gt;&lt;/iframe&gt;
  
   &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>scritp is refreshing to a blakc page, looking for src but im not sure how to label src of currently loaded iframe.</p>