Hey,
Ive got a compatability problem....
Im trying to check when an Iframe is done loading...
Can someone tell me why this doesnt work in Firefox but it does in IE:
--------------------------------------------------------------------
[HTML]<html>
<head>
<title>Check Statistics</title>
<script type="text/javascript" language="JavaScript"><!--
function StateChanged(){
var iframe = document.getElementById("stats");
alert("ready state change to: " + iframe.readyState);
if (iframe.readyState == "complete")
{
Done();
}
}
function start(){
var iframe = document.getElementById("stats");
iframe .setAttribute("src","http://google.com");
iframe .onreadystatechange = StateChanged;
}
function Done(){
alert("Done");
}
//-->
</script>
<body onload="start();">
<a href="#" onclick="GetStats();">Get Statistics</a>
<div>
<iframe id="stats" width=720 height=500 src="" frameborder="yes"
scrolling="no"></iframe>
</div>
</body>
</html>
[/HTML]-----------------------------------------------
(didnt use code tags because then it pastes with the line numbers =(
Cheers!
Andy