Horje
jquery check if iframe is loaded Code Example
jquery check if iframe is loaded
$('#myIframe').on('load', function(){
    //your code (will be called once iframe is done loading)
});
jquery when iframe is loaded
<script>
function checkIframeLoaded() {
    // Get a handle to the iframe element
    var iframe = document.getElementById('i_frame');
    var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;

    // Check if loading is complete
    if (  iframeDoc.readyState  == 'complete' ) {
        //iframe.contentWindow.alert("Hello");
        iframe.contentWindow.onload = function(){
            alert("I am loaded");
        };
        // The loading is complete, call the function we want executed once the iframe is loaded
        afterLoading();
        return;
    } 

    // If we are here, it is not loaded. Set things up so we check   the status again in 100 milliseconds
    window.setTimeout(checkIframeLoaded, 100);
}

function afterLoading(){
    alert("I am here");
}
</script>

<body onload="checkIframeLoaded();"> 




Javascript

Related
condition in string interpolation angular Code Example condition in string interpolation angular Code Example
how to add element in arry in js Code Example how to add element in arry in js Code Example
react native remove text from string Code Example react native remove text from string Code Example
check if a variable is a number in javascript Code Example check if a variable is a number in javascript Code Example
javascript check if date object Code Example javascript check if date object Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7