Gunther Radick wrote:
Let's say I've an IFRAME on a page, with an ID of "myFrame".
If I call -
myFrame.document.write( "Something" );
the "Something" gets written to the IFRAME, as expected, but
the browser (and this happens with all four major browsers)
continues to "load" the page. Even if there's nothing else left
to load.
Has anyone else noticed this? Is there a way around it?
Assuming that myFrame is a valid reference to the IFrame and not an IE
shortcut to it:
myFrame.document.open();
myFrame.document.write();
myFrame.document.close();
When you are remotely writing to a document (from anywhere other than
the page), you close() the document to let the browser know you are
finished writing, otherwise the browser is waiting for more instruction
so the page "continues loading".
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq