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

nsPIPromptService

This interface is for the dialog implementers, not for other developers.
Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

Implemented by: The contract ID isn't defined.

This interface defines the meaning of each indexes of GetInt(), SetInt(), GetString() and SetString() of the nsIDialogParamBlock interface but they are defined on in C++.

The indexes for GetString() and SetString() are:

eMsg
The value is 0. This is the message text of the dialog.
eCheckboxMsg
The value is 1. This is the label text of a checkbox on the dialog.
eIconClass
The value is 2. This is the class attribute value of the icon image.
eTitleMessage
The value is 3. This is the heading of the message.
eEditfield1Msg
The value is 4. This is the label text of the first text field on the dialog.
eEditfield2Msg
The value is 5. This is the label text of the second text field on the dialog.
eEditfield1Value
The value is 6. This is the default value of the first text field. This is also used for the result of the dialog.
eEditfield2Value
The value is 7. This is the default value of the second text field. This is also used for the result of the dialog.
eButton0Text
The value is 8. This is the label of the first button on the dialog.
eButton1Text
The value is 9. This is the label of the second button on the dialog.
eButton2Text
The value is 10. This is the label of the third button on the dialog.
eButton3Text
The value is 11. This is the label of the forth button on the dialog.
eDialogTitle
The value is 12. This is the title of the dialog.
eOpeningSound Obsolete since Gecko 1.9.2
The value is 13. This is the system sound name which should be played when the dialog is shown. See also nsISound.playSystemSound(). This is obsolete on Gecko 1.9.2 and later. You should use eSoundEventId instead.

The indexes for GetInt() and SetInt() are:

eButtonPressed
The value is 0. This is used for the result of the dialog. The pressed button number will be returned.
eCheckboxState
The value is 1. This is the default checkbox state and the result of it.
eNumberButtons
The value is 2. This is the number of the visible buttons on the dialog.
eNumberEditfields
The value is 3. This is the number of the visible text fields on the dialog.
eEditField1Password
The value is 4. If this value is 1, the first text field becomes a password field. Otherwise, it's a normal edit field. Note that the second is always password field.
eDefaultButton
The value is 5. This is the button number which should be the default button on the dialog.
eDelayButtonEnable
The value is 6. If this is not 0, the all buttons are disabled when the dialog is shown. And they will be enabled later.
eSoundEventId
The value is 7. This is the sound event ID which should be played when the dialog is shown. See also nsISound.playEventSound().

Method overview

void doDialog(in nsIDOMWindow aParent, in nsIDialogParamBlock aParamBlock, in string aChromeURL);

Methods

doDialog()

Opens a dialog.

void doDialog(
  in nsIDOMWindow aParent,
  in nsIDialogParamBlock aParamBlock,
  in string aChromeURL
);
Parameters
aParent
The parent window of the dialog.
aParamBlock
Various parameters for the dialog.
aChromeURL
The URL of the dialog implementation.

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh, Masayuki
 Last updated by: Sheppy,