Home > Element Reference : Dialog

Contents

### 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.

More information about Dialog

#### 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:

- accept: The OK button, which will accept the changes when pressed. This button will also be the default button.
- cancel: The cancel button which will cancel the operation.
- help: A help button for displaying help about the dialog.
- disclosure: A button to show more information. This might be a button or a disclosure triangle.

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:

- accept: The OK button, which will accept the changes when pressed. This button will also be the default button.
- cancel: The cancel button which will cancel the operation.
- help: A help button for displaying help about the dialog.
- disclosure: A button to show more information. This might be a button or a disclosure triangle.

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.

Copyright (C) 1999 - 2002 XULPlanet.com