View Single Post
Old 09-27-2010, 05:54 PM   PM User | #2
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
I'm using firefox and I'm not seeing any white flash. Wait... just tested opera and I see what you're talking about. Have you tried setting the iframe background to #000000?

i.e.,
PHP Code:
<iframe style="background:#000000;" src="inline.html" width="770" height="508" frameborder="0" scrolling="no"></iframe
or
PHP Code:
iframe {
    
background:#000000;

If that doesn't work, I don't see why waiting for the page to load to display the iframe would cause a "very long delay." You should be able to give the iframe an ID and set its display to none (and it would still load).
HTML:
PHP Code:
<iframe id="iframeSlideshow" src="inline.html" width="770" height="508" frameborder="0" scrolling="no"></iframe
CSS:
PHP Code:
#iframeSlideshow {
    
display:none;

Then add the following somewhere in the HTML:
PHP Code:
<script type="text/javascript">
    
window.onload = function(){document.getElementById('iframeSlideshow').style.display 'block';};
</script> 
Or maybe this would work better:
PHP Code:
<iframe style="display:none;" onload="this.style.display = 'block';" src="inline.html" width="770" height="508" frameborder="0" scrolling="no"></iframe
Or:
PHP Code:
<iframe onload="setTimeout(function(){this.style.display = 'block';}, 2000);" src="inline.html" width="770" height="508" frameborder="0" scrolling="no"></iframe
Or worst case, just add a slight delay and don't worry about onload:
PHP Code:
<script type="text/javascript">
    
setTimeout(function(){document.getElementById('iframeSlideshow').style.display 'block';}, 5000);
</script> 
I haven't tested any of this code but the concept is there.

Last edited by tfburges; 09-27-2010 at 05:57 PM..
tfburges is offline   Reply With Quote