frame "onload" fires only first time in NN?

T

TPG

I'd like a Javascript function I have written to be invoked whenever
*any* new document is been loaded into a particular frame (i.e I don't
control the incoming document's BODY tag). Under MSIE5.5, I've found
that the ONLOAD handler attribute of the corresponding frame element
is invoked *every* time a new document is loaded into that frame.
This works fine for me.

Under NN6.2, however, I find that the same ONLOAD handler attribute
fires only the *first* time a new document is loaded - and never
subsequently.

I have tried inserting a trigger via scripts that set the "onload"
propery of the frame-element and the frame-window objects, but under
NN6.2 neither causes the onload handler to be invoked after the
initial load.

I have thought of (and wasted a lot of time implementing) several
ingenious but fruitless attempts at workarounds - and now I am ready
to admit that I need some expert help.

TPG
 
M

Michael Winter

TPG wrote on 24 Nov 2003:
I'd like a Javascript function I have written to be invoked
whenever *any* new document is been loaded into a particular
frame (i.e I don't control the incoming document's BODY tag).
Under MSIE5.5, I've found that the ONLOAD handler attribute of
the corresponding frame element is invoked *every* time a new
document is loaded into that frame. This works fine for me.

Under NN6.2, however, I find that the same ONLOAD handler
attribute fires only the *first* time a new document is loaded
- and never subsequently.

I have tried inserting a trigger via scripts that set the
"onload" propery of the frame-element and the frame-window
objects, but under NN6.2 neither causes the onload handler to be
invoked after the initial load.

I have thought of (and wasted a lot of time implementing)
several ingenious but fruitless attempts at workarounds - and
now I am ready to admit that I need some expert help.

According to the HTML 4.01 specification, there is no 'onload'
intrinsic event for FRAME elements, only the BODY and FRAMESET
elements. This means that Internet Explorer isn't implementing the
specification properly (what a surprise). I would think the only
reason why Netscape would allow it is because the Frame object is
basically the window object.

Perhaps someone else could suggest a way around this.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top