Can I show a page after finish loading?
1) Open my page.
2) Begin load external page.
3) Open external page through window.location
I need have an event that the page is loaded and without iframe. P.s: page full loaded (DOM and all images).
Can I show a page after finish loading?
1) Open my page.
2) Begin load external page.
3) Open external page through window.location
I need have an event that the page is loaded and without iframe. P.s: page full loaded (DOM and all images).
If you are using jQuery, you can do something like this.
// JS
$(function(){
var external_page = $('#external_page');
external_page.ready(function(){
// This will be executed when the iframe is done loading.
alert('Page is done loading');
window.location.href = external_page.attr('src');
});
});
<!-- HTML -->
<iframe src="http://api.jquery.com" id="external_page"></iframe>
/* CSS */
iframe#external_page {display: none;}