[CLOSED] Confirm message in Code Behind and direct method (.ascx)

  1. #1

    [CLOSED] Confirm message in Code Behind and direct method (.ascx)

    Hello,
    (Same applies for Edit. None of the directmethods are working...)
    I have a confirm message in code behind which calls a direct method. But when I make a choice in the confirm message box I receive this error:
    Uncaught TypeError: App.direct.choice is not a function
    X.Msg.Confirm(Page.Title, "File exists", new MessageBoxButtonsConfig
                            {
                                Yes = new MessageBoxButtonConfig
                                {
                                    Handler = "App.direct.choice('Replace')",
                                    Text = "Replace"
    
                                }
                                 ,
                                No = new MessageBoxButtonConfig
                                {
                                    Handler = "App.direct.choice('Update')",
                                    Text = "Update"
                                }
                                ,
                                Cancel = new MessageBoxButtonConfig
                                {
                                    Handler = "",
                                    Text = "Discard"
                                }
                            }).Show();

            [DirectMethod]
            public void choice(string text)
            {
                txtAction.Text = text;
                SaveButton.FireEvent("click");
            }
    p.s. Accidentally I posted the same in the 4x forum (non Premium)
    Last edited by fabricio.murta; Jun 09, 2017 at 6:23 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Unfortunately, we were not able to reproduce the issue.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] How to return an error message from Direct method
    By barnali in forum 3.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 08, 2015, 11:53 AM
  2. Replies: 0
    Last Post: May 28, 2013, 2:51 PM
  3. [CLOSED] Call direct event from Confirm Message
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: May 22, 2013, 9:03 AM
  4. [CLOSED] Confirm to MenuItem with direct method.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 01, 2011, 7:56 PM

Posting Permissions