W
Workgroups
I've got a page where the nature of the beast is such that the user clicks a
submit button to ransomize some data in somewhat rapid succession (once per
second, give or take). The page generates a little table, 10x10, of small
pictures that represent the randomized data. The submit button tells the
server (which is keeping track of which pictures are where) to scramble them
around and output a new table. The output is simple HTML. The scrambling
needs to occur server-side, so I can't do the obvious thing, which would be
to simply scramble the pics around with JS. I have to do the actual
scrambling on the server.
So I created a page to do this task, and in the two browsers I've tested so
far (IE 6 and FF 1.0.6) there's a somewhat annoying little graphical anomoly
I'd like to eliminate, if I can. This all happens very quickly:
- user clicks submit
- browser "clears the screen", awaiting new data from postback <- can
create a "flicker"
- browser renders the postback
(repeat)
Now on some submit clicks (in either browser), the browser renders the new
postback data over the old data so encredibly fast (this is for an intranet
on a LAN btw, and the 'scrambling' process takes less than 1/1000th of a
second, and all pictures are cached on the client) that it the data on the
page, visually, the little graphics simply "shift" from one place to
another. It's so fast that, visually, the postback is transparent and it
almost looks as if I used JS to move the images. I honestly don't know if
the screen really gets cleared in between these, or the browser is only
updating parts of the screen it needs to.
But on other submits (in either browser), you can visually catch the browser
"clearing the window" so to speak, prior to renderning the postback.
Clicking the submit button in rapid succession results in a bit of a "strobe
effect" as the browser can sometimes flash "blank" very rapidly, in between
submit clicks. Perhaps the server delivery is just not *quite* fast enough
to have look "instantaneous" on some requests. Although IE tends to
"flicker" in this manner more often than FF, both browsers display the same
behavior given enough clicking.
So my question is, would it be possible to implement JS that forced every
click to look like a smooth one, maybe something like this:
- user clicks submit
- JS immediately instructs the browser to not "repaint" (et al) so that the
current page reamins in the browser without being "cleared" prior to the
postback arrival. (eliminate the "flicker")
- postback html is completely received by the browser (browser is still
displaying the "previous" page)
- JS instructs the browser to render the new postback directly without
"clearning" first, so that new data "instantly" replaces the old.
Are there aspects of JS/DOM I can research to accomplish something like
this, or am I more or less at the mercy of any given browsers display
mechanics here?
submit button to ransomize some data in somewhat rapid succession (once per
second, give or take). The page generates a little table, 10x10, of small
pictures that represent the randomized data. The submit button tells the
server (which is keeping track of which pictures are where) to scramble them
around and output a new table. The output is simple HTML. The scrambling
needs to occur server-side, so I can't do the obvious thing, which would be
to simply scramble the pics around with JS. I have to do the actual
scrambling on the server.
So I created a page to do this task, and in the two browsers I've tested so
far (IE 6 and FF 1.0.6) there's a somewhat annoying little graphical anomoly
I'd like to eliminate, if I can. This all happens very quickly:
- user clicks submit
- browser "clears the screen", awaiting new data from postback <- can
create a "flicker"
- browser renders the postback
(repeat)
Now on some submit clicks (in either browser), the browser renders the new
postback data over the old data so encredibly fast (this is for an intranet
on a LAN btw, and the 'scrambling' process takes less than 1/1000th of a
second, and all pictures are cached on the client) that it the data on the
page, visually, the little graphics simply "shift" from one place to
another. It's so fast that, visually, the postback is transparent and it
almost looks as if I used JS to move the images. I honestly don't know if
the screen really gets cleared in between these, or the browser is only
updating parts of the screen it needs to.
But on other submits (in either browser), you can visually catch the browser
"clearing the window" so to speak, prior to renderning the postback.
Clicking the submit button in rapid succession results in a bit of a "strobe
effect" as the browser can sometimes flash "blank" very rapidly, in between
submit clicks. Perhaps the server delivery is just not *quite* fast enough
to have look "instantaneous" on some requests. Although IE tends to
"flicker" in this manner more often than FF, both browsers display the same
behavior given enough clicking.
So my question is, would it be possible to implement JS that forced every
click to look like a smooth one, maybe something like this:
- user clicks submit
- JS immediately instructs the browser to not "repaint" (et al) so that the
current page reamins in the browser without being "cleared" prior to the
postback arrival. (eliminate the "flicker")
- postback html is completely received by the browser (browser is still
displaying the "previous" page)
- JS instructs the browser to render the new postback directly without
"clearning" first, so that new data "instantly" replaces the old.
Are there aspects of JS/DOM I can research to accomplish something like
this, or am I more or less at the mercy of any given browsers display
mechanics here?