Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery check if iframe is loaded

$('#myIframe').on('load', function(){
    //your code (will be called once iframe is done loading)
});
Comment

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();"> 
Comment

PREVIOUS NEXT
Code Example
Javascript :: textbox text change jquery 
Javascript :: node js request async await 
Javascript :: electron download 
Javascript :: nodejs increase heap size 
Javascript :: document is not defined javascript in nuxt js 
Javascript :: jquery delay to call function 
Javascript :: remove duplicate object from array 
Javascript :: get all keys of object in javascript 
Javascript :: how to start json server 
Javascript :: how to concurrently run angular and node 
Javascript :: node js check if a user exists in mysql 
Javascript :: type numeric value only in textbox javascript 
Javascript :: regex min length max length 
Javascript :: javascript object to json string 
Javascript :: javascript canvas dot 
Javascript :: remove falsy values from array javascript 
Javascript :: gms2 get array length 
Javascript :: get image url in react input file or preview form image 
Javascript :: instantiate object in script godot 
Javascript :: how to simulate a keypress in javascript 
Javascript :: font awesome react npm 
Javascript :: javascript replace string at position 
Javascript :: redirect script javascript 
Javascript :: event handling in react documentation 
Javascript :: js test if i am in iframe 
Javascript :: reactjs router link props 
Javascript :: inner content 
Javascript :: jquery button text 
Javascript :: update an item in array of object 
Javascript :: ajax image post ekleme 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =