views:

118

answers:

1

Is there a way to capture when the contents of an iframe have fully loaded from the parent page?

+2  A: 

Iframe elements have an onload event for that.

<iframe id="myframe" src="..."></iframe>

<script>
document.getElementById("myframe").onload = function() {
  alert("myframe is loaded");
};
</script>
galambalazs
Thanks, this does exactly what I needed!
ferrari fan