result Promise

Promise a jQuery promise instance, which can be used for callbacks, or passed to jQuery.when. The jQuery Deferred object resolves to:

  • done() - when user has pressed the "OK" button and the data passed to the callback is the inputted text;
  • fail() - when user has pressed the "Cancel" button and the data passed to the callback is the inputted text.

Example

<div id="prompt"></div>
<script>
$("#prompt").kendoPrompt({
content: "Prompt text",
value: "Default input text",
messages:{
  okText: "OK"
}
}).data("kendoPrompt").result.done(function(data){
      console.log("User accepted with text: " + data);
  })
  .fail(function(data){
      console.log("User rejected with text: " + data);
  });
</script>
In this article
Not finding the help you need? Improve this article