NN 6, IE 5
You want to show a progress bar while a long, repetitive script operation takes place.
Components of this solution consist of a minimum of HTML, a style
sheet to give the HTML its look and feel, and scripts to control the
display and animation of the progress bar. The HTML included in the
page consists of a group of nested
each of which makes up a separate visible portion of the user
interface: the wrapper around the entire progress bar, the label
text, the empty bar, and the colored bar that expands to the right
during the animation:
<div id="progressBar"> <div id="progressBarMsg">Calculating...</div> <div id="sliderWrapper">0% <div id="slider">0%</div> </div> </div>
The progress bar is hidden when the page loads, and the rest of its look and feel is controlled by an extensive style sheet described in the Discussion. You can customize the appearance by modifying the style sheet.
Apply the script shown in Example 15-5 to the
progress bar. The sequence used to control the progress bar consists
of calls to the
hideProgressBar( ) functions. See the
Discussion about how to repeatedly invoke
) to convey motion to the bar. The page must also include
onload event handler calls to two initialization
routines: the DHTML API library (Recipe 13.3) and the
<body onload="initDHTMLAPI( ); initProgressBar( )">
Despite the simplicity ...