[CLOSED] Confirmation Message

  1. #1

    [CLOSED] Confirmation Message

    Hi;
    i want to make a confirmation before clicking on a delete Button i succeed using the java-script confirmation
    i there any way to implement it using Using the Confirm Standard Yes/No dialog as in the Demos
    https://examples1.ext.net/#/MessageBox/Basic/Overview/
    any suggestions ??
    N.B Using version0.8.x
    Thanx u in Advance


    <script type="text/javascript">
             function confirmation() {
                 input_box = confirm("Click OK or Cancel to Continue");
                 if (input_box == true) {
                     return true;
                 }
                 else {
                     return false;
                 }
             }
    
          <ext:Button ID="btnDelete" runat="server" Text="Delete" Icon="Cancel">
                                        <Listeners>
                                            <Click Handler="if(confirmation()){Coolite.AjaxMethods.Delete( { success: doAlert});}"  />
                                        </Listeners>
           </ext:Button>
    Last edited by Daniil; Mar 07, 2011 at 9:21 PM. Reason: [CLOSED]
  2. #2
    Hi,

    You can use built in confirmation functionality for DirectEvent (see "Add a <Click> DirectEvent with confirmation")
    https://examples1.ext.net/#/Events/D...ents/Overview/
  3. #3
    Hi,
    i have seen these Example before but i can't use DirectEvent ,
    isn't there any way to get a confirmation the way i m using an Ajax-event ??
    Like using the Confirm MessageBox with a custom ButtonsConfig object which enables customization of each Button .
    THank youuu
  4. #4
    Hi,

    DirectEvent in Ext.Net 1.0 and AjaxEvent in Coolite are the same things.

    Example
    <ext:Button runat="server" Text="Test">
        <AjaxEvents>
            <Click OnEvent="TestHandler">
                <Confirmation ConfirmRequest="true" Title="Title" Message="Sample Confirmation Message..." />
            </Click>
        </AjaxEvents>
    </ext:Button>
  5. #5
    Hi,

    I don't understand you, what another confirmation do you need? If you use AjaxEvent then use built in Confirmation functionaity, if you use AjaxMethod then show confirmation manually before ajax method calling (call ajax method in the callback method of confirmation)
    Ext.Msg.confirm("title", "message", function(btn){
        if(btn == "yes"){
             // call here your ajax method
        }
    });
  6. #6
    i just need if btn=="yes" to confirmation return true as the confirm in javascript
    function confirmation() {
                // input_box = confirm("Click OK or Cancel to Continue");
    //             if (input_box == true) {
    //                 return true;
    //             }
    //             else {
    //                 return false;
                 //             }
                 Ext.Msg.confirm("title", "message", function (btn) {
                     alert(btn);
                     if (btn = "yes") {
                         returntrue()
                     }
                     else return false;
                 });
             }
  7. #7
    There is no way to achieve this behavior in the context of Ext.Msg.confirm() because it doesn't stop JavaScript execution.

    Well, it can look like this:

    Example
    function confirmation() {
         Ext.Msg.confirm("title", "message", function (btn) {
             if (btn = "yes") {
                 // call here your ajax method
             }
         });
         return false; //an ajax method is called if and only if the 'yes' button is clicked
     }

Similar Threads

  1. [CLOSED] [1.0] Confirmation Message
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 30, 2011, 4:46 PM
  2. [CLOSED] Translate password confirmation message
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 03, 2010, 6:11 PM
  3. Replies: 3
    Last Post: Aug 18, 2010, 9:34 PM
  4. [CLOSED] Yet another AjaxEvents Confirmation Message Question
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 08, 2010, 8:37 AM
  5. [CLOSED] Confirmation message question
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 06, 2009, 8:23 AM

Posting Permissions