Hi,
Been away from JS for a while, but not a novice.
I've got two DIVs the same size running in IE6 - both off screen initially - for a CD-based project using hand-coded HTML/JS with video clips running in Media Player.
One DIV says wait for video to load. Other DIV contains an OBJECT for Windows Media Player.
My routine is structured to move the wait DIV into sight, then load Media Player and wait for it to finish initialising before moving the movie DIV over the top of the wait DIV, and finally moving the wait DIV off screen again.
Looks all very easy in the code. Everything works fine, except that the wait DIV doesn't appear before Media Player has finished initialising and appeared on screen, thus defeating my wish to advise users to wait.
If I put in an alert box, then the wait DIV shows up in the right processing order.
If I remove the wait DIV off screen command, then it is there when I remove the movie.
There is clearly an issue with priorities somewhere - the browser seems to be hijacked by Media Player loading.
I've tried all sort of things including setting up delays and moving bits into separate functions - all to no effect.
So my question is: how can I force a browser screen update to get my wait DIV to show up when I want it to - ie before Media Player takes over?
Been away from JS for a while, but not a novice.
I've got two DIVs the same size running in IE6 - both off screen initially - for a CD-based project using hand-coded HTML/JS with video clips running in Media Player.
One DIV says wait for video to load. Other DIV contains an OBJECT for Windows Media Player.
My routine is structured to move the wait DIV into sight, then load Media Player and wait for it to finish initialising before moving the movie DIV over the top of the wait DIV, and finally moving the wait DIV off screen again.
Looks all very easy in the code. Everything works fine, except that the wait DIV doesn't appear before Media Player has finished initialising and appeared on screen, thus defeating my wish to advise users to wait.
If I put in an alert box, then the wait DIV shows up in the right processing order.
If I remove the wait DIV off screen command, then it is there when I remove the movie.
There is clearly an issue with priorities somewhere - the browser seems to be hijacked by Media Player loading.
I've tried all sort of things including setting up delays and moving bits into separate functions - all to no effect.
So my question is: how can I force a browser screen update to get my wait DIV to show up when I want it to - ie before Media Player takes over?