[Style Bug Hacks] Only chrome rendering white body while loading iframe content

Found this solution works great actually. Hidden the iframe until the content is loaded completely.

***

As this is browser behavior I doubt it can be really “fixed”.

One workaround is to hide the frame while it’s loading (only for Chrome) – here is the code:

var isChrome = (navigator.userAgent.indexOf("Chrome") >= 0);
function LoadFrame(url) {
    var oFrame = document.getElementById("myframe");
    if (isChrome) {
        oFrame.style.visibility = "hidden";
        oFrame.onload = function() {
            oFrame.style.visibility = "visible";
        };
    }
    oFrame.src = url;
}

Live test case. (Reloading same frame there but the concept is the same)

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s