I have a page where there are buttons that lead to html content being loaded within the host page using an object tag.
Is there a way of the host page knowing when the content has completed loading?
The reason is so that when:
- button is clicked a display loading gif across the host page
- html is loaded into object
- hide the loading gif
The host page loads. Buttons on the host lead to content to being loaded into an object:
<script>
.... check which button is pressed and assign path to target
var objectContent = "<object type=\"text/html\" data=\"" + target + "\" height=\"500px\" width=\"100%\" style=\"overflow:auto; min-height:400px;\"></object>";
document.getElementById('content').innerHTML = objectContent;
</script>
What I trying to figure out is how to know when the content has completed loading into the object.