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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:19:51+00:00 2026-06-14T10:19:51+00:00

Problem I have played around a lot with the knockoutJS mapping plugin. My problem

  • 0

Problem

I have played around a lot with the knockoutJS mapping plugin.

My problem can be best shown in the following jsFiddles.

This one works. But this dont work.

I get the the error in the console

Uncaught Error: ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!

Why i get this error and whats the difference in the fiddles ?

My Code

var viewModel = ko.mapping.fromJS({
    "State" : 1,
    "Text" : "Hello"
});

$("button").click(function() 
{
    var response = {
        "State" : 2,
        "Text" : "World"
    }
        
    ko.mapping.updateFromJS(viewModel, response);
});
    
ko.applyBindings(viewModel);
  • 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-14T10:19:53+00:00Added an answer on June 14, 2026 at 10:19 am

    You are using different versions of the ko mapping plugin:

    In your working fiddle: http://wiredwestwebdesign.com/knockout.mapping.js

    In you not working fiddle: https://raw.github.com/SteveSanderson/knockout.mapping/master/build/output/knockout.mapping-latest.js

    And the method in question ko.mapping.updateFromJS was deprecated about a year ago in this changeset: First part of removing the updateFromJS* calls.

    And how to fix this error:

    Just do what the exception says: use ko.mapping.fromJS and watch for the parameter order:

    ko.mapping.fromJS(response, viewModel);
    

    Demo fiddle.

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

Sidebar

Related Questions

Problem: I have a string that looks like this: [1=>2,3,4][5=>6,7,8][9=>10,11,12][13=>14,15][16=>17,18] Question: How can you
This is my problem: I have a player class and SwipeDetector Class in c#,
I've seen that a few instances of this problem have been raised already. However,
Problem: I have two array where one produce a category and the second produce
(Yes, I've read and played around based on answers to similar questions in this
After I have played around for some time using R's parallel package on my
I have this problem that a week ago, when debugging, suddently the Locals window
I've looked around a lot (trust me :) before posting this questions and I'm
another problem. I have already placed my Jython.jar into what my computer recognizes as
I am embedding my videos with JW player http://www.longtailvideo.com/players/ and I have a problem

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.