XUL Programmer's Reference Manual
<progressmeter>
|
||||||||||||
The progressmeter is a widget that displays the progress of an operation
as it executes. In Mozilla the progress meter (with the statusbar to the
right) looks like this:
When larger pages load in a browser, for instance, the progress meter shows the percentage of the page that has been loaded and how much remains to be done. The following example shows a progressmeter defined within a XUL box:
|
||||||||||||
value | ||||||||||||
Description
value is a required attribute for specifying the value or name of the progressmeter.Syntax <progressmeter value="character or string" />
<progressmeter id="nav=prog value="0" />
The value is not visible for progressmeters, as it is for titledbuttons and other XUL widgets. The value in this case XXX. |
||||||||||||
mode | ||||||||||||
Description
mode is a required attribute for specifying whether the length of the operation is known or unknown.Syntax <progressmeter mode="determined | undetermined | normal" />
<progressmeter id="nav-prog mode="undetermined" />
When the length of the operation cannot be determined, as for example when page loading times are affected by network traffic and other unforeseeables, you should set this attribute to "undetermined." |
||||||||||||
onclick | ||||||||||||
Description
onclick is an optional event listener attribute for the progressmeter.Syntax <progressmeter id="string" onclick="event handler code" />
<progressmeter id="string" onclick="dumpLoad()" />
The click event is fired when the user clicks on the actual progress meter. If you want to have an action performed -- if you want to cancel the operation that the progressmeter is tracking, for instance -- then you can write an event handler for this attribute, as in the following example: |
Last updated: 13:10 1/26/00 Ian Oeschger