Subj : Re: A question about iframe To : Akira From : Brendan Eich Date : Mon Jun 28 2004 12:15 pm Akira wrote: > Hello all, Wrong newsgroup, see headers. Cc'ing some folks who can say more. Keeping a reference to the document object across a window or iframe unload/load should work; at least, it did in Nav2-4 for windows and frames. /be > > I'd like to ask a question about iframe. > When my page is onload, I define a reference object > var referenceObj = document.getElementById('iframe').contentWindow.document; > > And then I use that object to get the innerHTML property. > referenceObj.body.innerHTML. There is no any problem yet. > > However, after I change the iframe.src dynamically, I can't use the > referenceObj. I have to define/update this again in order to get the > innerHTML property by this object. > I have tested in IE6 sp1, it doesn't need this step. But Mozilla needs. > IMHO, referenceObj is just a reference object, it should work even I > have change the iframe.src. > Is it bug or feature? > Can anyone explain this? > Thanks in advance. .