SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Settimeout() Background Flicker Problem

    Hi,

    I have an ajax javascript call that polls the server every 5 seconds, but when it does the settimeout() the background will flicker. Nothing else flickers but the background.

    Does anyone know a quick and dirty fix to stop this?

    Thanks,

    Mike

  2. #2
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function onlinestatus(page) {
    setTimeout("xajax_onlinestatus('"+ page +"')",5000);
    return false;
    }



    FROM PHP: Xajax php call runs and returns
    $objResponse->addScript("onlinestatus('".$page."');");

    which loops forever polling the server

    The background flashes each new setTimeout

  3. #3
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found the fix:

    http://dean.edwards.name/my/flicker.html

    hope this helps someone else out. Turns out it's an IE bug requires edit of .htaccess

  4. #4
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correction: This fixes the images loading from my own server. I've still got a problem from background images loaded from other servers =(

    Any suggestions are most welcome.

  5. #5
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  6. #6
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Karavvitz. I've been playing with that method. I wonder if other users will experience the problem. I have my internet explorer set to refresh page on every visit.

    I hope most of the net doesnt have it like that. Wonder what the default is?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •