The confirm function is established to show a confirm dialog. It can be called as far as once. The second calling is invalidated without any exceptions. But if with alert, the alert message will be added in the confirm dialog before the confirm message.
var result = new Result();
result.confirm("Let's do it,OK?" ,{"OK":"window.location='doit.jsp';","CANCEL":null});
Calling | Returning |
---|---|
Result . confirm ( message , buttons ) | Result |
Result . confirm ( message , buttons , title ) | Result |
Result . confirm ( message , buttons , params ) | Result |
Result . confirm ( message , buttons , title , params ) | Result |
Parameters | Type | Description |
---|---|---|
message | String | The information to show at the confirm dialog.
xxxx{param1}yyy{param2}yy You can define "{param}" in the message, it will be replaced by the params. |
buttons | Object | To define the buttons and the click actions.
{buttonName1:script1, buttonName2:script2} The script will be run at client after the button is clicked. |
params | Object | The params to replace "{param}" in the message.
{
param1:value1,
param2:value2
} |
title | String | The title for the confirm dialog. |