Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.54 KB

result.confirm.md

File metadata and controls

55 lines (41 loc) · 1.54 KB

Result.confirm

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.

Sample

var result = new Result();
result.confirm("Let's do it,OK?" ,{"OK":"window.location='doit.jsp';","CANCEL":null});

API

CallingReturning
Result . confirm ( message , buttons )Result
Result . confirm ( message , buttons , title )Result
Result . confirm ( message , buttons , params )Result
Result . confirm ( message , buttons , title , params )Result
ParametersTypeDescription
messageStringThe 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.

buttonsObjectTo define the buttons and the click actions.
{buttonName1:script1, buttonName2:script2}

The script will be run at client after the button is clicked.

paramsObjectThe params to replace "{param}" in the message.
{
	param1:value1,
	param2:value2
}
titleStringThe title for the confirm dialog.