@rasmusfl0e
I know that this is a big waste of cpu. But our customer demands it as
it is structured now.

@Eneko
Well, you solved it! Thanks a lot. I wrote a function that is called
periodical (func.periodical(10, this)) and that works fine.
Until now I didn' t got so much into how the animations etc. work.

On 17 Jul., 07:05, Eneko Alonso <eneko.alo...@gmail.com> wrote:
> Without entering on the design of your application, which can be good
> or bad, the problem you are having is very simple.
>
> In most browsers, the Screen does not get updated while the JS is
> running. Even if you are interacting with it, modifying elements on
> the DOM, it may happen that the screen wont refresh until your
> function ends.
>
> That's why timers are used for animations, etc. If you want your
> screen to refresh, you need to use a timer, or better said, you need
> to set an interval (setInterval).
>
> Then, on every interval call, which can be set to 1 or 10ms if you
> want, you can iterate through one or more divs (maybe 10 by 10).
>
> Do you know what I mean?
>
> Anyhow, good luck.
>
> On Thu, Jul 16, 2009 at 6:46 AM, Alexander<darig...@googlemail.com> wrote:
>
> > Generic? How do you mean that?
>
> > I'll explain a little more in detail what we do: we have a pool class
> > that has a property of type Hash. to this hash we add the teasers
> > classes that are based upon a div. That takes really long in IE6 (5-7
> > seconds) but not in Firefox (1 second max.). On each addition we want
> > to update a div. That does not work in IE 6, because it somehow blocks
> > the refreshing of the DOM, we can only update e.g. the toolbar with
> > window.status = 'XXX'.
>
> > On 16 Jul., 15:22, "Steve Onnis" <st...@cfcentral.com.au> wrote:
> >> So none of the actions or whatever are generic? As in they don't apply to
> >> more than one or all items?
>
> >> If this is not the case I would seriously look at restructuring the way 
> >> your
> >> application works because it certainly isn't an ideal situation
>
> >> Just my opinion anyway...
>
> >> -----Original Message-----
> >> From: Alexander Herrmann [mailto:darig...@googlemail.com]
> >> Sent: Thursday, 16 July 2009 10:40 PM
> >> To: MooTools Users
> >> Subject: [Moo] Re: DOM refresh in IE6
>
> >> well, the divs are teasers which can de dragged from and into
> >> different pools (dragging areas). each teaser has a litte
> >> functionality as well as a pool has also a representation in
> >> javascript. so we move the teaser class from pool x to y and do some
> >> other actions with it. that's why :)
>
> >> On 16 Jul., 14:34, "Steve Onnis" <st...@cfcentral.com.au> wrote:
> >> > I'll be the first one to ask "why"?
>
> >> > Why are you doing this for?
>
> >> > -----Original Message-----
> >> > From: Alexander [mailto:darig...@googlemail.com]
> >> > Sent: Thursday, 16 July 2009 10:32 PM
> >> > To: MooTools Users
> >> > Subject: [Moo] DOM refresh in IE6
>
> >> > Hi there,
>
> >> > we have a page with a lot of divs (300+). For each div we load an
> >> > javascript representation that is a class. This works fine and is
> >> > performant using firefox. But using the Internet Explorer 6 it is
> >> > really slow. The speed can't be optimized but we'd like to display a
> >> > progress bar for loading. The html for the bar is displayed by
> >> > default, then we run through the page dom getting the divs and
> >> > creating their appropriate javascript class representation. On each
> >> > div we update the progress bar setting the text of a div container.
> >> > That works fine in firefox, but IE6 does only update the dom and so
> >> > our progress bar after the script finished adding the divs js classes.
> >> > So is there a way to get the dom update while the script is adding the
> >> > divs?
>
> >> > Thanks in advance!

Reply via email to