question

AbstractItem.question(mess, yes_callback, no_callback, options)
Domain:

client

Language:

javascript

Class:

AbstractItem()

Description

Creates a modal form with Yes, No buttons

If yes_callback, no_callback functions are specified they will be executed when user clicks on the Yes or No button, respectively, and then the form will be closed.

Parameters

Parameter

Type

Description

mess

string

specifies the text or html content that will appear in the body of the form.

yes_callback

function

functions will be executed when user clicks on the Yes button.

no_callback

function

functions will be executed when user clicks on the No button.

options

object

Example

The following code creates a modal form, and delete selected record record when the user clicks the Yes button:

item.question('Delete record?',
    function() {
        item.delete();
    }
);

The result of the code above will be:

Message delete record