onResult

Page

Registers a function to execute when a child page has sent a result.

$m.onResult(function(eventObject) {

$m.toast("Result from child page - " + eventObject.result);// Result coming from eventObject.page

});

Syntax

        $m.onResult(fp_onresult[, context])

Parameters

fp_onresult

function (required)

Function to execute when a child page has sent a result. The function receives an eventObject which contains the following property,

  1. result - {object/string/number/boolean}. Result that is sent by the child page.

context

Object (optional)

Context in which the function should execute. If not provided, the function will be executed in window context.

Remarks

Refer setResult method to know about passing data from a child page to parent page.