tedious refresh effect

M

Marco

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
 
S

saz

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
You can fix it by taking away the fade effect.

Personally, I leave websites that have fade-ins because I find it
annoying.
 
N

Neredbojias

With neither quill nor qualm, Marco quothed:
but when the page reloads it disappears for a while and it is really
tedious.

Most "dynamic" effects _are_ tedious once you've seen them a few times.
How can I solve this problem?

Forget it and use some css styling for candy-striping if you want.
 
M

Marco

Maybe I did not explain me well: I meant I have to remove the time
while the page reloads.
I tried the fade effect to hide the reload effect but it is
unsuccesful.
I'm thinking to reload the page in background to increase reload time.
What do you think of backgroung reloading? do you have exaples?

thanks

Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top