|
Posted by Marco on 11/22/69 11:39
hi all!
I've done a web chat using javascript/html and I have a question: I've
based my chat on reloading a page that fetches data from a db.
I set up the page with this tag:
<META HTTP-EQUIV="REFRESH" CONTENT="7">
and this script to have a fade effect
<SCRIPT>
<!--
/*Background fade by Dave Methvin,
Windows Magazine
May be used/modified if credit line is
retained*/
function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
RunFader();
}
function RunFader() {
var epct = step/inc;
var spct = 1 - epct;
document.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
if ( step < inc ) {
setTimeout('RunFader()',50);
}
step++;
}
BgFade(0x00,0x00,0x00, 0xFF,0xFF,0xFF,10);
//-->
</SCRIPT>
but when the page reloads it disappears for a while and it is really
tedious.
How can I solve this problem?
thanks
marco
Navigation:
[Reply to this message]
|