.closePage()

Previous Next

Closes the page and returns to the previous page on the stack.

Returns a Promise object or the 'this' object.

Syntax

.closePage( options )

 

options   ::=  {

    accept:  accept

,   check:  before-function

,   quiet:  quiet

,   steps:  steps

,   promise:  promise

,   success:  success-function

,   error:  error-function

}

 

accept    ::=  { true | false }

check     ::=  { true | false }

quiet     ::=  { true | false }

promise   ::=  { true | false }

 

Options is a struct that can have the following items, all of which are optional.

Accept has an effect only if the page being closed is a lookup page. It determines whether the current lookup value is accepted or not. The default is false, meaning that by default, if a lookup page is closed the current value is not accepted as lookup value.

Check has an effect only if there are unchecked data manipulations. It determines whether such manipulations are checked. The default is true, meaning that if there are unchecked data manipulations, they are checked by default.

Quiet is a boolean determining whether messages are displayed during the operation or not. The default is false, meaning that messages are displayed by default.

Steps is an integer determining the number of pages that are closed. The default is 1, meaning that only the current page is closed by default.

Promise determines the return value of this function. If promise has the value 'true' (the default), a Promise object is returned. If promise has the value 'false', the ‘this’ object is returned instead.

Success-function is a function called after the operation has successfully completed.

Error-function is a function called if an error occurs.

 

Examples

$.udb.closePage({accept: true, quiet: true});

 

$.udb.closePage()

    .then(function() { 

        ... 

    });