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

  • Home
  • SEARCH
  • 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 8284423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:05:54+00:00 2026-06-08T11:05:54+00:00

I have a fetch() in the callback function of $.post() . The fetch() grabs

  • 0

I have a fetch() in the callback function of $.post(). The fetch() grabs the data from the backend and updates the collection just fine, however when its time to run either its success or error callbacks, nothing happens! I placed console.log()s in both its callbacks and they never appear in the Javascript console.

Any idea what happened?

A method in a View

create_set: function() {
    var self = this;

    // Post data to server
    $.post('api/create_set', {
        user_id: $('#user_id').val(),
        post_id: this.post_id,
        set_name: $('#new_set_name').val()
    }, function() {

        // Update list of Sets
        self.setList.fetch({
            data: {
                user_id: $('#user_id').val(),
                post_id: this.post_id
            },
            processData: true
        }, {
            success: function() {
                // Highlight the first class in list
                $(self.setListView.el).children('div:first').addClass('active');
                console.log('success'); // DOESNT RUN!
            }
        }, {
            error: function() {
                console.log('error');  // DOESNT RUN!
            }
        });

        console.log('hello');  // RUNS!

    });
}
  • 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-08T11:05:55+00:00Added an answer on June 8, 2026 at 11:05 am

    success and error should be the properties of options object that you pass to fetch, you don’t have to create separate objects for them:

    self.setList.fetch({
      data: {...},
      processData: true,
      success: function(){...},
      error: function(){...}
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL DB and I fetch data from there via PowerPivot into
I have created my android code wherein I fetch all the data from facebook
I have to fetch all the files from a folder and i am using
I have to fetch about few hundreds records from CoreData and group them by
I have a data fetching method that uses jQuery.ajax() to fetch xml files. /*
I'm using jQuery's $.ajax method to fetch data from a JSONP-compatible web service and
I have to fetch sales representative's name and customer support's email id. So in
I am using graph API. I have to fetch feed(i.e.. posts on the particular
I can't seem to find the resolution for this. I have modified the Fetch
I have this query to fetch the total OrderStatus that have values 1 and

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.