Mozilla XUL Element and Script Reference

Contents  Quick Reference

Dialog

    Moz0.9.4

This element should be used in place of the window element for dialog boxes. The buttons attribute may be used to set which buttons should appear in the dialog box. These buttons will be placed in the correct locations.

Attributes:

Attributes inherited from XUL Element

buttonalign

The value of the 'align' attribute for the box containing the buttons.

buttondir

The value of the 'dir' attribute for the box containing the buttons.

buttonorient

The value of the 'orient' attribute for the box containing the buttons.

buttonpack

The value of the 'pack' attribute for the box containing the buttons.

buttons

A comma-separated list of buttons to appear on the dialog box. The buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically. The following values can be used in the list:

ondialogaccept

The code in this attribute is called when the OK button is pressed, or when the acceptDialog function is called.

ondialogcancel

The code in this attribute is called when the Cancel button is pressed, or when the cancelDialog function is called.

ondialogdisclosure

The code in this attribute is called when the disclosure button is pressed.

ondialoghelp

The code in this attribute is called when the Help button is pressed.

title

Properties and Methods:

Properties and Methods inherited from XUL Element

acceptButton ( )

Accepts the dialog and closes it, similar to pressing the OK button.

buttons

A comma-separated list of buttons to appear on the dialog box. The buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically. The following values can be used in the list:

cancelButton ( )

Cancels the dialog and closes it, similar to pressing the Cancel button.

getButton ( type )

Returns the button element in the dialog corresponding to the given type.