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 7558881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:29:21+00:00 2026-05-30T12:29:21+00:00

Have checked some backbone.js tutorials and can’t understand how to get model id from

  • 0

Have checked some backbone.js tutorials and can’t
understand how to get model id from the server within
the model saving process. I have a model:

var Game = Backbone.Model.extend({
    defaults: {
        name: '',
        releaseDate: ''
    },
    url: function(){
        return '/data.php';
    } 
});

How to implement getting the id algorithm? It seams to me, there should
be a kind of callback function, but can’t realise where to put it.

  • 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-05-30T12:29:23+00:00Added an answer on May 30, 2026 at 12:29 pm

    See Backbone’s documentation on model save.

    You can pass a success callback function to save, something like this:

    var game = new Game({
        name: 'Duke Nukem 3D',
        releaseDate: '1996'
    });
    
    game.save({}, {
        success: function(model, response) {
            // get model id from response?
        }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have checked out a directory from my local SVN: server. After changing some
I have checked some examples on internet but I can't get my (first) batch
I have a ListView with multiple choice entries where some are checked from the
I have checked out from the main trunk and made some changes that I
I have checked-out a project from SourceForge named HadoopDB . It uses some class
I have checked some of ASP.NET MVC themes from Microsoft's web site but they
I have checked out some files from subversion repository. After building, there are a
I have checked out some projects from SVN repository. To build those projects I
I have a checkbox which in some cases may be disabled and checked using
I have checked in a huge Eclipse project from my desktop computer to the

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.