tedious refresh effect

Discussion in 'HTML' started by Marco, Feb 8, 2006.

  1. Marco

    Marco Guest

    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
    Marco, Feb 8, 2006
    #1
    1. Advertising

  2. Marco

    saz Guest

    In article <>,
    says...
    > 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.
    saz, Feb 8, 2006
    #2
    1. Advertising

  3. Marco

    Neredbojias Guest

    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.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Feb 9, 2006
    #3
  4. Marco

    Marco Guest

    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
    Marco, Feb 9, 2006
    #4
  5. Marco

    Marco Guest

    Maybe the answer is preloading? is it possible to preload a page?

    Marco
    Marco, Feb 9, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    4
    Views:
    413
    Steve C. Orr [MVP, MCSD]
    Mar 29, 2005
  2. Bruno

    refresh effect

    Bruno, Dec 6, 2004, in forum: HTML
    Replies:
    8
    Views:
    605
    Guest
    Dec 7, 2004
  3. =?Utf-8?B?RGFiYmxlcg==?=

    browser refresh effect on session variables and view state?

    =?Utf-8?B?RGFiYmxlcg==?=, Aug 7, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    812
    Kumar Reddi
    Aug 8, 2006
  4. Jonathan Wood

    Tedious Login During Development

    Jonathan Wood, Nov 8, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    273
    Jonathan Wood
    Nov 9, 2007
  5. Dave
    Replies:
    1
    Views:
    102
Loading...

Share This Page