[CLOSED] always show "request failure" message box

  1. #1

    [CLOSED] always show "request failure" message box

    when open the url "http://info.hdsoso.com/fenlei_city.aspx?prov=5&city=103" , then quickly click one of cate,such as "家政", then show the error below


    the same error show when i open a url such as "http://info.hdsoso.com/fenlei_city.aspx?prov=5&city=103", then quickly click the home page , then ,show the same error.
    Attached Thumbnails Click image for larger version. 

Name:	QQ??20140703232146.png 
Views:	256 
Size:	6.3 KB 
ID:	13291  
    Last edited by Daniil; Jul 11, 2014 at 5:06 PM. Reason: [CLOSED]
  2. #2
    Click image for larger version. 

Name:	QQ??20140703232835.png 
Views:	268 
Size:	38.2 KB 
ID:	13311
    error show when quickly click the page . if click slowly , no error.
  3. #3
    The DirectMethod or DirectEvent Request you are making is failing somehow.
    Geoffrey McGill
    Founder
  4. #4
    it is because the page does not finish the requests before an user clicks a link on the page?
  5. #5
    Yes, that might be related.
    Geoffrey McGill
    Founder
  6. #6
    how to do ?
  7. #7
    Quote Originally Posted by hdsoso View Post
    how to do ?
    How to do what? I do not understand what you are requesting.
    Geoffrey McGill
    Founder
  8. #8
    how to remove the "request failure" messeagebox
  9. #9
    Hi @hdsoso,

    You could try to handle
    <ext:ResourceManager runat="server" ShowWarningOnAjaxFailure="false" />
    or/and handle a ResourceManager's AjaxRequestException event.

    If you use a Loader, then its
    <Loader ShowWarningOnFailure="false">
    setting and the Exception event might be helpful as well.
  10. #10
    Let me know whether the following example helps you

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
    
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <script language="javascript">
    
            var ajaxRequestException = function (response, result, el, eventType, action, extraParams, o) {
    
                Ext.Msg.alert("Error", result.errorMessage);
            }
    
            var btnClick = function () {
    
                Ext.net.DirectMethod.request({
                    url: Ext.net.ResourceMgr.resolveUrl("~/Example/PerformAction"),
                    cleanRequest: true,
                    success: function (result) {
                        alert("Success");
                    },
                    failure: function (resposta) {
                        alert("Failure");
                    }
                });
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ScriptMode="Development" runat="server">
            <Listeners>
                <AjaxRequestException Fn="ajaxRequestException" />
            </Listeners>
        </ext:ResourceManager>
        <ext:Button Text="Click Me !!!" runat="server">
            <Listeners>
                <Click Handler="btnClick();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
    namespace RCNBS.Visions.SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Index()
            {
                return View();
            }
    
            public AjaxResult PerformAction()
            {
                return new AjaxResult
                {
                    ErrorMessage = "Error"
                };
            }
        }
    }
    Last edited by RCN; Jul 07, 2014 at 2:26 PM.

Similar Threads

  1. Replies: 9
    Last Post: Mar 25, 2014, 6:51 AM
  2. Replies: 2
    Last Post: Apr 05, 2012, 4:55 AM
  3. Replies: 6
    Last Post: Nov 15, 2011, 2:02 AM
  4. [CLOSED] Store "communication failure" and request method OPTIONS
    By nikisbeta in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 16, 2011, 1:53 PM
  5. Replies: 1
    Last Post: Oct 21, 2010, 6:16 PM

Posting Permissions