[CLOSED] Prompt before DirectEvent

  1. #1

    [CLOSED] Prompt before DirectEvent

    I have a javascript function that will ask users if ok to proceed.
    I thought that by returning false, the direct event would be cancel..but the success event fires even before the user can answer the confirmation..

        function CheckForSectorChange()
        if ((#{hidInitSectorTeam}.getValue() != #{cmboSectorTeam}.getValue()) |  (#{hidInitAnalyst}.getValue() != #{cmboAnalyst}.getValue()))
            Ext.Msg.confirm('Workflow Restart', 'You are changing either the sector team, or the analyst for a fund that has a running Investment Review. If you continue, you will be restarting the workflow. Do you agree?', function(btn, text) {
            if (btn == 'yes')  
            return true; 
             return false;
            return true;

        <ext:Button runat="server" ID="Button2" Text="Save" Icon="Disk">
                    <Click OnEvent="ChangeDetail" Before="CheckForSectorChange();" Failure="Ext.Msg.alert('Failure',result.errorMessage);#{winDetailChange}.hide(); "
                        Success="UpdateDetailLabels(); #{winDetailChange}.hide(); Ext.Msg.alert('Success','Details have been saved.');">
                            <ext:Parameter Name="ListValues" Value="Ext.encode(#{lstStyles}.getRowsValues())"
                                Mode="Raw" />

  2. #2

    RE: [CLOSED] Prompt before DirectEvent


    Ext.Msg.confirm is async function (it doesn't block current context execution)
    Please use classic 'confirm' method or DirectEvent confirmation functionality (second button - DirectEvent with confirmation)
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. [CLOSED] Supported browsers prompt message
    By bakardi in forum 1.x Premium Help
    Replies: 5
    Last Post: Jan 27, 2015, 7:04 AM
  2. Replies: 9
    Last Post: Nov 23, 2012, 4:13 AM
  3. [CLOSED] MessageBox prompt with required field
    By jchau in forum 1.x Premium Help
    Replies: 2
    Last Post: Feb 23, 2012, 5:39 PM
  4. Custom Prompt MessageBox
    By EzaBlade in forum 1.x Help
    Replies: 2
    Last Post: Nov 04, 2009, 12:14 PM
  5. Get the value from prompt dialog and save
    By CoolNoob in forum 1.x Help
    Replies: 5
    Last Post: Oct 23, 2009, 3:13 PM

Posting Permissions