Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

A meter which can be used to display the progress of a lengthy operation. It is drawn as a bar that is filled as the operation completes. In addition, an indeterminate progressmeter may be created by setting the mode attribute to undetermined. This is used when the length of time to complete an operation is not known beforehand.

More information is available in the XUL tutorial.

Attributes
max, mode, value
Properties
accessibleType, max, mode, value

Examples

Image:XUL_ref_progress.png
<progressmeter mode="determined" value="82"/>
<progressmeter mode="undetermined"/>
<!-- switching modes while the mouse is over a button -->
<progressmeter mode="determined" id="myProgress"/>
<button label="Example" onmouseover="setLoading(true)"
                        onmouseout="setLoading(false)"/>
function setLoading(state){
  document.getElementById('myProgress').mode =
           (state) ? 'undetermined' : 'determined';
}

Attributes

max
Type: integer
The maximum value that progressmeter may have. The default value if not specified is 100 such that the value may be used as a percentage.
mode
Type: one of the values below
A determinedprogressmeter is used in cases where you know how long an operation will take. An undeterminedprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
determined
The progress meter uses its value attribute to determine the amount of the bar that is filled in.
undetermined
The progressmeter is indeterminate.
value
Type: integer
An integer ranging from 0 to the maximum value that indicates the progress. For instance, if no maximum value has been set, setting the value to "0" shows an empty bar, "100" shows a bar at full length and "25" shows the first quarter of the bar.

Inherited from XUL element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

Properties

accessibleType
Type: integer
A value indicating the type of accessibility object for the element.
max
Type: integer
Gets and sets the value of the max attribute.
mode
Type: string
Gets and sets the value of the mode attribute.
value
Type: string
Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax.

 

Inherited Properties
align, attributes, allowEvents, baseURI, boxObject, builder, childElementCount, childNodes, children, className, clientHeight, clientLeft, clientTop, clientWidth, collapsed, contextMenu, controllers, database, datasources, dir, firstChild, firstElementChild, flex, height, hidden, id, lastChild, lastElementChild, left, localName, maxHeight, maxWidth, menu, minHeight, minWidth, namespaceURI, nextElementSibling, nextSibling, nodeName, nodeType, nodeValue, observes, ordinal, orient, ownerDocument, pack, parentNode, persist, prefix, previousElementSibling, previousSibling, ref, resource, scrollHeight, scrollLeft, scrollTop, scrollWidth, statusText, style, tagName,textContent, tooltip, tooltipText, top, width

Methods

Inherited Methods
addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

Interfaces
nsIAccessibleProvider

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh, Enn, Marsf, Mgjbot, James0, Allanbonadio, Ptak82, Dria, Pmash
 Last updated by: Sheppy,