Why is the load
event not fired in IE for iFrames?
Please take a look at this example.
Work perfectly as expected in FF and Chrome, but IE fails
IE might have already loaded the content (and fired the event) before you add the handler. I found that when I statically specified the iframe src attr, and added $(x).load event handlers via jquery, firefox (3.6.28) triggered my handlers but IE (8.0.6001.18702) didn't.
I ended up adjusting my test program so that it set the iframe src via javascript after adding the $(x).load handler. My $(x).load handler was called at the same points in IE and Firefox (but note a handler added via iframe onload attribute behaved differently between IE and FF) . Here is what I ended up with:
... and here was the Firefox "log":
i1/eb_mce_iframe_content.html actually loaded i1:
Fred the fox.
/eb_mce_iframe_content.html actually loaded x:
Fred the fox.