frame "onload" fires only first time in NN?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TPG

    #1

    frame "onload" fires only first time in NN?

    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
  • Michael Winter

    #2
    Re: frame "onload&qu ot; fires only first time in NN?

    TPG wrote on 24 Nov 2003:
    [color=blue]
    > 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.[/color]

    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

    --
    Michael Winter
    M.Winter@blueyo nder.co.uk.invalid (remove ".invalid" to reply)

    Comment

    Working...