WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

@mozilla.org/embedcomp/prompt-service;1

This component implements the following interfaces:

Constants

Button Position Flags
PRUint32 nsIPromptService.BUTTON_POS_0 = 1
PRUint32 nsIPromptService.BUTTON_POS_1 = 256
PRUint32 nsIPromptService.BUTTON_POS_2 = 65536
Button Title Flags (used to set the labels of buttons in the prompt)
PRUint32 nsIPromptService.BUTTON_TITLE_OK = 1
PRUint32 nsIPromptService.BUTTON_TITLE_CANCEL = 2
PRUint32 nsIPromptService.BUTTON_TITLE_YES = 3
PRUint32 nsIPromptService.BUTTON_TITLE_NO = 4
PRUint32 nsIPromptService.BUTTON_TITLE_SAVE = 5
PRUint32 nsIPromptService.BUTTON_TITLE_DONT_SAVE = 6
PRUint32 nsIPromptService.BUTTON_TITLE_REVERT = 7
PRUint32 nsIPromptService.BUTTON_TITLE_IS_STRING = 127
Button Default Flags (used to select which button is the default one)
PRUint32 nsIPromptService.BUTTON_POS_0_DEFAULT = 0
PRUint32 nsIPromptService.BUTTON_POS_1_DEFAULT = 16777216
PRUint32 nsIPromptService.BUTTON_POS_2_DEFAULT = 33554432
Causes the buttons to be initially disabled. They are enabled after a timeout expires. The implementation may interpret this loosely as the intent is to ensure that the user does not click through a security dialog too quickly. Strictly speaking, the implementation could choose to ignore this flag.
PRUint32 nsIPromptService.BUTTON_DELAY_ENABLE = 67108864
Selects the standard set of OK/Cancel buttons.
PRUint32 nsIPromptService.STD_OK_CANCEL_BUTTONS = 513
Selects the standard set of Yes/No buttons.
PRUint32 nsIPromptService.STD_YES_NO_BUTTONS = 1027

Methods

InterfaceMethod
nsIPromptService void alert ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text )
nsIPromptService void alertCheck ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRBool confirm ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text )
nsIPromptService PRBool confirmCheck ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRInt32 confirmEx ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , PRUint32 buttonFlags , PRUnichar* button0Title , PRUnichar* button1Title , PRUnichar* button2Title , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRBool prompt ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , inout PRUnichar* value , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRBool promptPassword ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , inout PRUnichar* password , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRBool promptUsernameAndPassword ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , inout PRUnichar* username , inout PRUnichar* password , PRUnichar* checkMsg , inout PRBool checkState )
nsIPromptService PRBool select ( nsIDOMWindow parent , PRUnichar* dialogTitle , PRUnichar* text , PRUint32 count , arrayof PRUnichar* selectList , out PRInt32 outSelection )

Reference documentation is generated from Mozilla's source.