Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SCREEN UPDATES

0 views
Skip to first unread message

Julian Turner

unread,
Nov 16, 1999, 3:00:00 AM11/16/99
to
Hello, can you help?

When my script processes a block of style changes for a large number of
paragraphs, the screen updates after each individual style change, which can
look messy.

I have tried screen.updateInterval, but this only affects or delays the
initial activation of the JavaScript.

Once the JavaScript is processing,
the screen is still updated instantly after each instruction is processed.

Is there anything I can do to stop the screen updating until a block of Java
Script has processed?

Jules


Martin Honnen

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Just a thought if you used two stylesheets and alternatively
enabled/disabled them are you getting better results??
E.g.

<STYLE ID="style1">
P {
color: lime;
}
</STYLE>
<STYLE ID="style2">
P {
color: blue;
}
</STYLE>
<SCRIPT>

</SCRIPT>
</HEAD>
<BODY ONCLICK="document.getElementById('style2').disabled =
!document.getElementById('style2').disabled">
<P>
Kibology for all.
</P>
<P>
All for Kibology.
</P>


I don't know if that fits your needs but could imagine that such
stylesheet toggling is faster and smoother than changing individual
styles.

--

Martin Honnen

http://www.sector27.de/martin.honnen/jsgoddies.html

Jim Ley

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to

Julian Turner <ju...@philosophers.net> wrote in message
news:eb7Q11IM$GA.205@cppssbbsa05...

> Hello, can you help?
>
> When my script processes a block of style changes for a large number of
> paragraphs, the screen updates after each individual style change, which can
> look messy.
>
> I have tried screen.updateInterval, but this only affects or delays the
> initial activation of the JavaScript.
>
> Once the JavaScript is processing,
> the screen is still updated instantly after each instruction is processed.
>
> Is there anything I can do to stop the screen updating until a block of Java
> Script has processed?

Does window.offscreenBuffering=true have any effect?

What code are you using to do the changes, there could be a different
approach.

Jim.

Julian Turner

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Thank you for the idea. I will give it a try and let you know the results.

It may not quite fit my need, which is to selectively display individual
paragraphs within a document, akin to a the msdn cascading table of
contents.

See the vary basic web site if have started at www.baconbutty.com if you are
interested.

Regards Julian

Julian Turner

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Thank you for the idea.

I have tried it, but unfortunately it does not work.

If you are interested, have a look at what I am trying at
www.baconbutty.com - the welcome page.

Its nothing special, but if you have any other ideas.

Regards

Julian

Julian Turner

unread,
Nov 20, 1999, 3:00:00 AM11/20/99
to
Hi

Just an update to my last message.

Thankyou Martin Honnen. I have experimented with the "disabled" property
and met with success.

I have included two links in the web page as follows:-

<link id=sheet1 rel=stylesheet type=text/css src=stylesheet1.css>
<link id=sheet2 disabled=true rel=stylesheet type=text/css
src=stylesheet2.css>

Both style sheets set up identical classes, except that in all classes in
sheet 2, display is set to none.

The key move then is in sheet1 to set up two classes for each element: For
example

.elementvisible {display:block}
.elementinvisible {display:none}

Importantly, in sheet2, elementvisible is also {display:none}

When I want to display only certain of the elements in the page I then do as
follows:-

1. Set disabled=false for sheet2 <link>, so everything disappears.
The browser gives priority to the second stylesheet. So the order of the
stylesheets is important.

2. Process the elements in the document, so that those which I want
to see are className="elementvisible", and those I want to hide are
className="elementInvisible"

3. Set disabled=true for sheet2, so that sheet1 is re=applied.

Thanks

Jules

0 new messages