skip to Main Content

An iframe link to an html page isn’t updating on the page with the iframe when I edit the html page that is being linked to.

<div style="position: fixed; left:151; top:232;height:542px;width:826px;overflow:auto;background-color:#ff5a93">
<iframe src="indexsub.html" width="826" height="542" frameborder="0" scrolling="yes" name="frame" id="mainframe"></iframe>
</div>

Here’s the code I’m using, I copy and pasted this onto two other pages and they seem to be updating fine, I don’t know the issue.

2

Answers


  1. You can add a function in JS code which is refreshing the iframe:

    function Refresh(){
    var iframe = document.getElementById("IFRAME ID");
    iframe.src = "NAME/LOCATION OF THE FILE";
    }
    
    Login or Signup to reply.
  2. You can try to constantly refresh the page you publish as an iframe.

    indexsub.html inline

    setTimeout(() => {
      document.location.reload();
    }, 3000);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search