question

Creates a modal form with Yes, No buttons

question(mess, yes_callback, no_callback, options)

domain: client

language: javascript

class AbstractItem

Description

Use question to create a modal form with Yes and No buttons.

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

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.

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