I have an iframe placed in my page body as follows:
<iframe src="about:blank" onload="this.contentWindow.document.write('some text')">
It works quite well, the onload event replaces the contents of the iframe with "some text" and thus it.
BUT in Firefox, it calls the โspinning wheelโ loading indicator, which indicates that the page is loading so that it never leaves. Only text is inserted in the iframe, so there is no other content hanging around waiting to load. When I remove the iframe from the page, this fixes the problem, so I know that it is the called iframe that calls it.
It works correctly in IE and Chrome.
Now I can do something like this:
<iframe src="about:blank" onload="this.contentWindow.document.write('some text'); t.contentWindow.stop();">
What problem is fixed in Firefox, but it prevents the loading of any images in the iframe (I do not use them in the example of inserting text, but they will be added later).
So how can I fix this?
javascript html firefox load
user2079305
source share