pi********@gmail.com wrote:
<snip>
I can walk thru all the frames and display their name. what
I want to do is to modify their 'onload' script to be
notified when the frame content has changed (no, I can not
set onload='...' in the html) but even if I set
onload='top.myproc(...)', this top.myproc is never called :(
Yes, that isn't going to work because the act of loading a page into a
frame re-sets the - onload - property of that frame's window/global
object. So any handlers you may externally assign to the property will
be removed prior to their ever getting a chance to execute.
is it possible ?
Broadly no. However, on recent IE versions and recent Mozilla versions,
and using the - attachEvent - and - addEventListener - methods (as
applicable) rather than assigning directly to the onload property, it is
possible to attach an event handler to an IFRAME element and have that
listener execute each time new contents load into the IFRAME. The IFRAME
element itself is not replaced when its contents change. I have never
tried doing the same with the FRAME elements within a FRAMESET but it is
probably worth a try. The results are certainly _not_ cross browser, and
there is no reason to expect this to work at all (that is; no public
specification implies that it should).
Richard.