A
Andrew Poulos
Whenever the content of a frame ('mainFrame') has loaded I call a
function. The following code works in IE 5.5+ but IE 5 does nothing (I
have a different technique for MZ, FF...):
window.onload = function() {
var doc = document.getElementById("mainFrame");
doc.onreadystatechange = function() {
if (doc.readyState == 'complete') {
// do stuff
}
}
}
</script>
</head>
<frameset rows="60,100%,60" cols="*" border="0" framespacing="0"
frameborder="0">
<frame src="top.htm" name="topFrame"id="topFrame" scrolling="auto" noresize>
<frame src="about:blank" name="mainFrame" id="mainFrame"
scrolling="auto" noresize>
....
I've tried a variety of things
var doc = window.frames['mainFrame'];
var doc = window.frames[1];
....
doc.onload = function() {
....
Short of putting an onload handler in every page that will be loaded
into the frame, is there a way to get the onload event, of a page in a
frame, trigger a call to a function in the parent frameset?
Andrew Poulos
function. The following code works in IE 5.5+ but IE 5 does nothing (I
have a different technique for MZ, FF...):
window.onload = function() {
var doc = document.getElementById("mainFrame");
doc.onreadystatechange = function() {
if (doc.readyState == 'complete') {
// do stuff
}
}
}
</script>
</head>
<frameset rows="60,100%,60" cols="*" border="0" framespacing="0"
frameborder="0">
<frame src="top.htm" name="topFrame"id="topFrame" scrolling="auto" noresize>
<frame src="about:blank" name="mainFrame" id="mainFrame"
scrolling="auto" noresize>
....
I've tried a variety of things
var doc = window.frames['mainFrame'];
var doc = window.frames[1];
....
doc.onload = function() {
....
Short of putting an onload handler in every page that will be loaded
into the frame, is there a way to get the onload event, of a page in a
frame, trigger a call to a function in the parent frameset?
Andrew Poulos