facebook

DialogBox to get user confirmation

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #345660 Reply

    bremy
    Member

    Hello

    First of all, Happy New Year 🙂

    Does it exists a native DialogBox function? The need will be to get confirmation from the user before deleting something.
    So a function displaying a dialogBox with a question text and buttons “Yes”, “No” (for exemple)

    Thanks

    #345687 Reply

    support-michael
    Keymaster

    In a native app you can access the Cordova/PhoneGap notification api or you can use the standard javascript confirm(“do you like me”)

    In the following screenshot I used this snippet from a Run Javascript action attached to a button.

    navigator.notification.confirm(
      "is it good",
      function() {},
      'survey',
      ['yes','not really']);

    At this time you can only test/evaluate this snippet in a native ios or android app. The Simulator does not emulate the Cordova notification apis yet.

    #345732 Reply

    bremy
    Member

    Thanks Michael. I’m going to have a triy for this nice solution

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: DialogBox to get user confirmation

You must be logged in to post in the forum log in