2013-10-02 2 views
1

Adobe Edge를 사용하여 웹 사이트를 구축하고 index.html 페이지에 다른 HTML 페이지를로드하는 iframe이 몇 개 있습니다. 모든 파일은 동일한 도메인에 있습니다.Adobe 가장자리의로드시 iframe 리로드

이유가 없지만 일부 iframe 콘텐츠가 Firefox에서 올바르게로드되지 않습니다. 하지만 iframe을 새로 고침하면 완벽하게로드되므로 iframe을로드 할 때 자동으로 다시로드 (한 번만 수행)해야합니다. 이 페이지에 가능한 솔루션을 볼 수

Iv'e : How to force an iFrame to reload once it loads

난 그냥 어도비 에지에서 솔루션 스크립트를 넣어 어디에 확실하지 않다.

이 "의 creationComplete"각 iframe이 지금은 모습입니다 :

sym.$("AboutPage").append('<iframe width="100%" height="100%" src="About.html" frameborder="0" scrolling="no"></iframe>'); 

답변

0
sym.$("AboutPage").append('<iframe onload="reloadOnce(this)" width="100%" height="100%" src="About.html" frameborder="0" scrolling="no"></iframe>'); 
sym.$("otherPage").append('<iframe onload="reloadOnce(this)" width="100%" height="100%" frameborder="0" scrolling="no" src="otherPage.html"></iframe>'); 

var iframeLoadCount = 0; 
function reloadOnce(iframe) { 
    iframeLoadCount ++; 
    if (iframeLoadCount <= 1) { 
    iframe.contentWindow.location.reload(); 
    console.log("reload()"); 
    } 
} 

나는이 코드가 나는 때문에 반드시 100 % 아니다 "의 creationComplete"에 기록 될 생각하는 방법을 생각 내 컴퓨터의 FireFox에서 iFrames를로드하는 데 문제가 없습니다. 이것이 당신을 위해 작동하지 않으면 알려주십시오.