writing to document.cookie make the screen flash

S

sun

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.style.display == 'inline')
{
icon.src = icon.CollaspedSrc;
e.src = e.CollaspedSrc;
sign.src = sign.CollaspedSrc;
subTree.style.display = 'none';
}
else
{
document.cookie = 'category=' + catid;
icon.src = icon.CollaspedSrc;
e.src = e.ExpandedSrc;
sign.src = sign.ExpandedSrc;
subTree.style.display = '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?
 
G

goykhmanster

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.
 

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

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top