May 19, 2017, 7:30 AM
[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:
(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