Click to See Complete Forum and Search --> : DOM in MSIE with HTA


Charles
11-20-2008, 11:47 AM
The client went and put four or five thousand MPGs on DVDs but now wants them all in one directory on one external hard drive. I've written a charming little HTML Application (HTA) that copies things over and keeps a log (I've come to love ADO recordsets) but I'm having a wee problem with the UI.

I'm using DOM methods to list in a table what's being copied but I can't get MSIE to display the results until the copying is done. How do I get MSIE to stop buffering and draw the results?

baconbutty
11-20-2008, 12:22 PM
Assuming your problem is that IE does not update the display whilst any code is running (and I don't think this can be prevented as such), there are two ways (probably obvious ones to someone of your caliber), in which I try to achieve this:-

1. Timeouts. It will obviously update between timeouts. You could call a timeout each time the buffer is full, and re-fill the buffer on the next timeout.

2. Write to an IFRAME (or POP-UP WINDOW or DIALOG BOX). Some browsers (I think IE is one, sorry if it is not) seem to run these in separate threads (for want of a more accurate word) to that you can update their contents from an external script in the parent, and see the updates live during the course of a javascript function.

I would be interested to know how you get on.