writing to document.cookie make the screen flash

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sun

    #1

    writing to document.cookie make the screen flash

    In Javascript, I write to document.cookie , and retrieve it in server
    side.

    It's in a treenode control, when the node is expanded, I write
    document.cookie :

    if(subTree.styl e.display == 'inline')
    {
    icon.src = icon.CollaspedS rc;
    e.src = e.CollaspedSrc;
    sign.src = sign.CollaspedS rc;
    subTree.style.d isplay = 'none';
    }
    else
    {
    document.cookie = 'category=' + catid;
    icon.src = icon.CollaspedS rc;
    e.src = e.ExpandedSrc;
    sign.src = sign.ExpandedSr c;
    subTree.style.d isplay = 'inline';
    }

    There is no problem with retrieving the cookie. The problem is when
    expanding the tree, the whole screen flashes.

    How to stop it from flashing?
  • goykhmanster@gmail.com

    #2
    Re: writing to document.cookie make the screen flash

    I ran into the same problem. I got rid of it by writing to
    document.cookie only during onSubmit event. If anyone has better
    solutions, I'd really appreciate it.

    Comment

    Working...