fo******@yahoo.co.uk wrote:
Given a web page using frames, is there anyway the left frame can request a
page in the right frame and, most importantly, detect when it has fully
loaded?
Ideally this requires no changes to the original web page being loaded on
the right.
With IE5.5/6 on Win you could from the first frame call
parent.document.getElementsByTagName('frame')[1].attachEvent('onload',
function (evt) {
// just an example, handle the load event here
alert(evt ? evt.type : event.type);
}
);
and then set
parent.frames[1].location = 'whatever.html';
With Mozilla and Netscape 7 you can from the first frame call
parent.document.getElementsByTagName('frame')[1].addEventListener('load',
function (evt) {
alert(evt ? evt.type : event.type);
},
true
);
and then set
parent.frames[1].location.href = 'whatever.html'
With other browsers you will have to use <body onload> in the document
loaded in the frame
--
Martin Honnen
http://JavaScript.FAQTs.com/