1

I use this bit of code:

<!DOCTYPE html>
<html>
    <head>
        <title>Example</title>
    </head>
    <body>
        <script>
        window.setInterval("reloadIFrame();", 3000);
        function reloadIFrame() {
                     document.getElementsByName("testFrame")[0].contentWindow.location.reload();
        }
        </script>
        <iframe name="testFrame" src="https://docs.google.com/presentation/d/1jkNVBxAX57PjfxTNTkgO8zNnMFYoKUqUKQ4aJk8pCIs/embed?start=true&loop=true&delayms=5000" width="760px" height="920px"></iframe>
    </body>
</html>

And it works well for some websites, but not for this google presntation.. What should I change to make it works?

  • Please see this post : [Cross-Origin Frame Issue](https://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame) – partho222 Jun 07 '17 at 09:21

1 Answers1

0

You can try this instead, otherwise you will have a cross origin issue:

document.getElementsByName("testFrame")[0].src="https://docs.google.com/presentation/d/1jkNVBxAX57PjfxTNTkgO8zNnMFYoKUqUKQ4aJk8pCIs/embed?start=true&loop=true&delayms=5000";

regards

fxlacroix
  • 535
  • 3
  • 16