:: Forum >> Version 2 >>

Manipulating HTML DOM in a Blocking Way with JavaScript

Hello all,

I've got the following problem, hope someone can help:

I've this HTML page with lots of tables, applets, divs etc. and I'm using JavaScript both for data transfer and presentation.

At a certain point in execution, I'm trying to set an object visible/invisible, and continue with data transfer. Like:

mainDIV.visibility="visible";
makeDataTransfer();

mainDIV is a full-page div object, with a couple of images and applets in it, so it needs some time to actually be *visible* on the screen. However, I strictly don't want anything to happen before mainDIV is really really visible.

My problem is, in Internet Explorer's JScript DOM implementation, makeDataTransfer() method (or any code fragment that follows) is called, even though mainDIV is not visible yet. What IE does is that, it sets the "visibility" attribute to "visible", and continues with the makeDataTransfer() method. After a certain time, mainDIV will actually be visible, however I have no control on making the makeDataTransfer() method getting called after mainDIV actually becomes visible.

I'll be glad if you can give me some pointers on this matter.

mozorhan@hotmail.com
m. ozorhan
Tuesday, November 22, 2005
Normally IE will only repaint the screen after completing execution of the javascript thread (script block or event handler). The only workaround which I know involves using modal dialog:

http://www.faqts.com/knowledge_base/view.phtml/aid/1602
/javascript.forum.3006.9/a-fun-one-for-a.html

Alex (ActiveWidgets)
Tuesday, November 22, 2005
Wow!!!

The pause code with the modal dialog actually works!

Thanks a lot!
m. ozorhan
Wednesday, November 23, 2005



This topic is archived.

Back to support forum

Forum search