[1.0]transaction aborted friendly message

  1. #1

    [1.0]transaction aborted friendly message

    Hi Guys,
    We catch this 'transaction aborted' error for the Internet speed reason.But we need to
    change the error message from english to other language,What should I do?

    Any help will be appreciatted. :)
  2. #2
    Hi,

    Please look at the example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Button_Click(object sender, DirectEventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Click me">
            <DirectEvents>
                <Click OnEvent="Button_Click" Timeout="1000" Failure="if (response.statusText == 'transaction aborted') { Ext.Msg.alert('Error', 'My transaction aborted messagge')}"/>
            </DirectEvents>
        </ext:Button>
        </form>
    </body>
    </html>
  3. #3
    Here's another example which might help with your scenario.

    This sample demonstrates cancelling the transaction, and responding with a custom ErrorMessage. The ErrorMessage is then passed into a custom JavaScript function which renders an message to the user.

    Example

    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void Button1_Click(object sender, DirectEventArgs e)
        {
            e.Success = false;
            e.ErrorMessage = "Transaction Error<br />" + DateTime.Now.ToLongTimeString();
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
        
        <script type="text/javascript">
            var doSomething = function (result) {
                Ext.Msg.notify("Message", result.errorMessage);
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:Button runat="server" Text="Submit">
                <DirectEvents>
                    <Click OnEvent="Button1_Click" Failure="doSomething(result);" />
                </DirectEvents>
            </ext:Button>
        </form>
    </body>
    </html>
    Hope this helps.
    Geoffrey McGill
    Founder
  4. #4
    Thanks,

    I'll have to give that a try.

Similar Threads

  1. [CLOSED] Transaction Aborted
    By majunior in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 21, 2011, 12:42 PM
  2. [CLOSED] Transaction Aborted
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 23, 2011, 8:32 AM
  3. Transaction aborted
    By norphos in forum 1.x Help
    Replies: 0
    Last Post: Jul 11, 2011, 11:47 AM
  4. [CLOSED] Transaction Aborted message
    By egodoy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 11, 2011, 11:46 AM
  5. [CLOSED] transaction aborted
    By ilanga in forum 1.x Legacy Premium Help
    Replies: 24
    Last Post: Sep 16, 2010, 8:08 AM

Tags for this Thread

Posting Permissions