PDA

View Full Version : IFRAME BG Color White On Refresh


aaronjudson
06-09-2005, 03:53 PM
hey

Im currently having problems with a iframe i have created. It is a IFrame that contains a message board and is refreshed every 2 minutes to allow the users to see an up to date message.

i had an older version which on refresh, held the background color, and did not flash white when it was loading. But now i have updated the site, and the message board everytime it reloads flashes white while it is loading, this is really annoying and does not look good at all.

this is the code i call on for the iframe.
<TD HEIGHT="150" ALIGN="center">
<IFRAME SRC="/english/cs/apps/includes/msgboard.cfm" NAME="iMessageBoard" WIDTH="141" HEIGHT="150" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0" SCROLLING="NO" ALLOWTRANSPARENCY="true"></IFRAME>
</TD>

this is a snippet of the body code for the iframe
<BODY LEFTMARGIN="0" TOPMARGIN="0" STYLE="background:none transparent;">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center">
<INPUT TYPE="hidden" NAME="txtTime"><SCRIPT>txtTime.value = showTimeSec();</SCRIPT>
<TR>
<TD CLASS="SiteText" VALIGN="top">
<!--- Scrolling Marquee Code Starts here --->
<MARQUEE BEHAVIOR="scroll" DIRECTION="up" WIDTH="141" HEIGHT="150" SCROLLAMOUNT="1" SCROLLDELAY="75" onMouseOver="this.stop()" onMouseOut="this.start()">

etc etc.

Does anyone know how to make it so that when the page refreshes every 2 minutes it does not flash white, and will hold the background?

any help will be greatly appreciated :)

If anymore information is required i will happily post it for you.

Thanks
Aaron

MaGnA
06-09-2005, 05:02 PM
You can load up the contents in a hidden iframe and then copy the innerHTML from the hidden iframe to a visible div/td on your page. That way, you'll get the smoothest possible user experience, without any "flashes". Check out twofifty.net (http://twofifty.net/). The entire site is built on content injection from a hidden iframe. The main page is actually a single static HTML file and I push HTML into divs from a hidden iframe.

aaronjudson
06-09-2005, 05:19 PM
thanks magna, and that is a good possibility that i may use if i cant find another solution.

i just need to know how do you get the background to load first before anything else, and not see the white flash, you see alot of sites that if you go to, they dont have the white page it flashes to first, it just automatically loads up the background.

does anyone have any ideas?

thanks

aaronjudson
06-10-2005, 12:59 PM
I have tried everything, the site is to be launched really soon, so i guess i will try the hidden iframe if noone else has any ideas.