Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7919783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:58:42+00:00 2026-06-03T15:58:42+00:00

i am new to web programming so please excuse my naive question, i tried

  • 0

i am new to web programming so please excuse my naive question, i tried searching on web but couldn’t find answer to my basic question.

I am using extjs (for widgets and ajax) and python (using bottle) on server side.

here is my requirement.

I have extjs EditorGrid which has just one column (editable). on the index route (bottle route) i return json dictionary which is populated in this grid and shown, all well till this point, now I want to update value of this column and save updated value on the server side.

so i added another route on my python script, and ajax_reply as url to my ajax request on javascript (code below).

now my question is that how do i send a response to client, say for example i want to send a failure to client (i.e. updated was not successful on server and i want to send ajax response that update failed. i tried sending random stuff from my ajax_reply route but always success is called on client.

I am confused how to send a json response from ajax_repose function and then parse it again in my javascript success or failure function to act accordingly.

any help is much appriciated

@bottle.route('/ajax_reply', method='POST')
def update_column():
    return { 'success' : False }


var grid = new Ext.grid.EditorGridPanel({
                tbar: [{ text : 'Remove' }, {text : 'Add'}],
                ds: ds,
                frame:true,
                listeners: {
                  afteredit : function(e){
                        Ext.Ajax.request({
                        url : '/ajax_reply',
                        params : {
                               action: 'update',
                                id : e.record.id,
                                field: e.field,
                                value : e.value
                        },
                        success : function(resp, opt){
                           e.record.commit();
                           Ext.Msg.alert('SUCCESS', 'success...');
                        },
                        failure: function(resp, opt){
                           Ext.Msg.alert('ERROR', 'error...');
                           e.record.reject();
                        }
                  });
                }
                },
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:58:43+00:00Added an answer on June 3, 2026 at 3:58 pm

    If you’re using Ext.Ajax.request you need to parse response yourself. Even if server can’t update record but generated some kind of proper response

    { success: false, msg: 'Failed to save record' }
    
    • this will still get to your success function. Because Ajax request itself was successful.

    However if you’re using grid and editors – I would recommend to look at different way of doing this – check documentation for remote stores, readers/writers etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a basic question, but new to Rails and web programming and haven't found
I'm new to Django and Web programming in general. Have googled but could not
I'm new to web programming, but I had an idea I could use as
Please be gentle, as I'm still new to web programming and -very- new to
I'm new to web programming and doing different tutorials that I can find on
Probably its my first question in ASP.Net. I am new to Web-Programming and trying
i am new to web programming. i am trying to connect database using jsp
So, I am pretty new to web programming and I just understand the basic
I'm pretty new to web programming, reading a book on ASP.NET, and I notice
I'm new to web programming in general so this is probably a really simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.