netwerk/base/public/nsIPrompt.idlScriptable
This is the prompt interface which can be used without knowledge of a parent window. The parentage is hidden by the GetInterface though which it is obtained.
Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Note: This interface is identical to nsIPromptService but without the parent nsIDOMWindow parameter. To avoid redundancy, all methods here link to nsIPromptService. If you are using this interface, you must remove the nsIDOMWindow arguments from those methods.

Normally you would use the prompt service as it is more flexible, but sometimes a callback will request an nsIPrompt via nsIInterfaceRequestor.getInterface(). To get an instance, call the nsIWindowWatcher.getNewPrompter().

Method overview

void alert(in wstring dialogTitle, in wstring text);
void alertCheck(in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue);
boolean confirm(in wstring dialogTitle, in wstring text);
boolean confirmCheck(in wstring dialogTitle, in wstring text, in wstring checkMsg, inout boolean checkValue);
PRInt32 confirmEx(in wstring dialogTitle, in wstring text, in unsigned long buttonFlags, in wstring button0Title, in wstring button1Title, in wstring button2Title, in wstring checkMsg, inout boolean checkValue);
boolean prompt(in wstring dialogTitle, in wstring text, inout wstring value, in wstring checkMsg, inout boolean checkValue);
boolean promptPassword(in wstring dialogTitle, in wstring text, inout wstring password, in wstring checkMsg, inout boolean checkValue);
boolean promptUsernameAndPassword(in wstring dialogTitle, in wstring text, inout wstring username, inout wstring password, in wstring checkMsg, inout boolean checkValue);
boolean select(in wstring dialogTitle, in wstring text, in PRUint32 count, [array, size_is(count)] in wstring selectList, out long outSelection);

Constants

The button flags defined in nsIPrompt are the same as those defined in nsIPromptService.Constants. Example usage is also documented: Using the button Flags

See Also

nsIPromptService