% 'Instantiate new progress bar Set pBar = New ProgBar 'Write the client-side code (once per page) pBar.WriteScript True 'Set the optional parameters pBar.Name = "progbar" pBar.Width = 400 pBar.Height = 20 pBar.Margin = 2 pBar.Full = 10 pBar.Block = 2 pBar.Color = "#FF0000" pBar.BackColor = "#FFFFFF" pBar.BorderColor = "#000000" pBar.Caption = "" 'Write the CSS style code for the progress bar pBar.WriteStyle 'Instantiate a second progress bar Set subBar = New ProgBar 'Set the optional parameters (quick-format) subBar.Bar "subbar", 400, 20, 2, 75000, 5, "#0000FF", "#FFFFFF", "#000000", "This is a test of the progress bar webclass" 'Write the CSS style code for the progress bar subBar.WriteStyle %>
<% 'Write the actual HTML code for the progress bars pBar.WriteBar subBar.WriteBar For x = 0 to 9 For i = 0 to 75000 'Out of our total of 100,000 operations, set 1 more complete subBar.Fill 1 Next 'Clear the progress bar subBar.Clear 'For some reason, on the 3rd operation, we want to set ourselves to 50 percent complete. If x = 2 Then pBar.Percent = 50 Else If x = 4 Then pBar.Percent = pBar.Percent - 10 Else 'Out of our total of 10 operations for this bar, set 1 more complete pBar.Fill 1 End If End If Next %>