[CLOSED] Hide AjaxRequestException Window

  1. #1

    [CLOSED] Hide AjaxRequestException Window

    Hi all,

    I was searching a solution like this. But it is not working on Ext.Net 2.2.

    Also you can return false from an AjaxRequestException listener or set
    o.cancelFailureWarning = true;
    to prevent a warning window.
    AjaxRequestException returns false but window is opening. How can i prevent showing the window?

    Thanks,
    Vzx
    Last edited by Daniil; May 30, 2013 at 12:45 PM. Reason: [CLOSED]
  2. #2
    Hi @vzx,

    It works in the test case below. Please provide your test case.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            throw new Exception();
        }
    </script>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
                <Listeners>
                    <AjaxRequestException Handler="//o.cancelFailureWarning = true; // it also works
                                                   return false;" />
                </Listeners>
            </ext:ResourceManager>     
    
            <ext:Button runat="server" Text="Initiate an AJAX request" OnDirectClick="TestDirectEventHandler" />
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil,

    Here is my test case. It doesn't work in DirectMethod. Is it normal?

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            throw new Exception();
        }
    
        [DirectMethod]
        public void TestDirectMethod()
        {
            throw new Exception();
        }
    </script>
    <script type="text/javascript">
        var TestDirectMethod = function () {
            App.direct.TestDirectMethod(
                {
                eventMask: {
                    showMask: true
                }
            });
        }
    
        var ajaxReqEx = function (response, result, el, eventType, action, extraParams, o) {
            Ext.MessageBox.alert('hi');
            return false;
        }
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server">
                <Listeners>
                    <AjaxRequestException Fn="ajaxReqEx" />
                </Listeners>
            </ext:ResourceManager>
            <ext:Button ID="Button1" runat="server" Text="DirectEvent" OnDirectClick="TestDirectEventHandler" />
            <ext:Button ID="Button2" runat="server" Text="DirectMethod">
                <Listeners>
                    <Click Handler="TestDirectMethod();"></Click>
                </Listeners>
            </ext:Button>
        </form>
    </body>
    </html>
    Thanks,
    Vzx
  4. #4
    It is a bug. Fixed in SVN. Please update or use
    o.showFailureWarning = false; // workaround for a DirectMethod
    return false;
  5. #5
    Quote Originally Posted by Daniil View Post
    It is a bug. Fixed in SVN. Please update or use
    o.showFailureWarning = false; // workaround for a DirectMethod
    return false;
    Thanks Daniil.

    Vzx

Similar Threads

  1. [CLOSED] Hide AjaxRequestException Window
    By Tactem in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 12, 2012, 1:21 PM
  2. [CLOSED] problem hide window
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 18, 2012, 4:11 PM
  3. Hide the minimized window from the taskbar
    By xtremexploit in forum 1.x Help
    Replies: 1
    Last Post: Nov 24, 2011, 12:46 PM
  4. Unable to Hide the Window
    By vivekrane1986 in forum 1.x Help
    Replies: 2
    Last Post: Jul 22, 2010, 4:48 AM
  5. ext:Window Hide Handler
    By haltenberg in forum 1.x Help
    Replies: 8
    Last Post: Aug 05, 2008, 10:36 PM

Tags for this Thread

Posting Permissions