Resonant request: iframes in IE that indicates download progress?

One thing that worries me about IE is that when a page with an iframe loads, it will wait for the iframe to finish loading before it renders the page. Firefox will contrast all other elements of the page while the iframe is loading, which is really nice if the iframe takes a long time because it gives the user some feedback that the page is progressing. It also allows you to do things like display the messege "iframe loading" while the frame is loading and replace it with the iframe loading.

So, I'm wondering if anyone has found a workaround for this. Ideally, I would like to see a cross-browser solution that shows the progess panel as iframe loading on the page. In short, I would take an iframe implementation method that forces IE to render the page first and then load the iframe.

I've seen a couple of interesting jquery progress bars: http://plugins.jquery.com/project/jQueryProgressBar

But ... (and correct me if I'm wrong, because my understanding is shaky) ... It seems to me that jquery bars only show up after the DOM has loaded. In IE, the content of the iframe is not displayed until after the DOM is loaded, so showing a progress bar at that point is irrelevant.

I also tried setting the iframe src to load.htm and then onload to switch the src to the content I want. Unfortunately IE still won't render the page until the final content page appears (seems odd to me).

Help me on stackoverflow, you are my only hope.

+1


source to share


2 answers


What if you loaded the page using XmlHttpRequest and then replace the document content as / when loading it?



<!-- jQuery example: -->

<div id='content'>Loading...</div>

<script type='text/javascript'>
$("#content").load(url);
</script>

      

+2


source


You can set the location of your iframe using JavaScript after loading the parent window.

<body onload="document.getElementById('myIframe').location='someurl';">
    <iframe id="myIframe">
</body>

      



It would be the most rudimentary way to do it.

+1


source







All Articles