Results 1 to 4 of 4

Thread: send response to Connection request

  1. #1

    Question send response to Connection request

    Hello,
    I have this problem:

    my application does this Connection:

    [Client]
    var conn = new Ext.data.Connection();
    conn.request({
    url: 'addUsers.action',
    params: {
    action: 'add',
    id: text
    },
    success: function (resp, opt) {
    Ext.Msd.alert("ok", "ok");
    },
    failure: function(resp, opt) {
    Ext.Msg.alert('Error', 'Error');
    }
    });

    [Server]
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    {
    success:<%= request.getAttribute("actionEsit")%>,
    data: 'not well'
    }

    The message from server is:
    {success:false, data: 'not well'}

    now, i see a message dialog window with text "ok".
    How is it possible ? the variable success is equals to false,
    why i not see the message "Error" ?

    Please help me.
    Thanks for your time. byee byee

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    With Ext JS Ajax, any non-fatal return code (200's), is considered a successful request. Do not get Ext JS BasicForm Submit action return validation confused with Ext JS ajax requests.

  3. #3
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    Moved to Ext Help. Please post related help questions here.

  4. #4

    Default

    ok, i forgot this difference.
    now i understand because i didn't see what i expected

    thank you.

Similar Threads

  1. Replies: 12
    Last Post: 17 Feb 2010, 12:28 AM
  2. How can I send a request without waiting for a response
    By daja77 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 6 Oct 2009, 7:33 AM
  3. understant the response from data.connection
    By sebastien in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 13 Jan 2009, 9:18 AM
  4. Ext.data.Connection request response
    By ferr in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 4 Feb 2008, 8:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •