View Full Version : Force on-screen update.

04-02-2003, 06:17 AM
How do you force the browser window to update it's display in Javascript? OR
What is the equivlent of Visual Basic's Doevents?
This is not the same as asp's response.flush.... it's on the clients browser.

History:I am saving data from via javascript, and asp. The data is entered in standard textboxes, the save 'button' is pressed, which runs a routine to collate the data and open another window with parameters that asp on that page use to save.
There is also a DIV on the first page that is displayed so the the user can see when data is being saved. Within the javascript save function this div has an image that has it's width resized (progress bar styley) as things proceed.
All works well except the on screen display of the progress bar. This will only display the image as it is on inital load. If I stick an alert box in after each row the progress bar works fine. I suspect that the users wouldn't be too excited about having to click OK for each row though!
So how to force the image display/div to be updated?


04-02-2003, 03:47 PM
Not quite sure ... it sounds like you want an animated progress bar you can update through script?

DD has just the thing - http://www.dynamicdrive.com/dynamicindex11/dhtmlprogress.htm - does that help you?

04-02-2003, 10:55 PM
Thanks, but that (as groovy as it is) is no good. It's time dependant rather than dependant on the number of records. ..and it too has the same problem.

It will do nothing unless I force a screen refresh with alert boxes...

Any other ideas?