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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:23:16+00:00 2026-05-30T07:23:16+00:00

I am trying to understand what Knockout does to elements on the page when

  • 0

I am trying to understand what Knockout does to elements on the page when it updates the values in them due to applyBinding.

Consider this simple example:

<!DOCTYPE html>
<html>
<head>

    <title>Example</title>
        <script src="../lib/jquery-1.7.1.min.js"></script>
    <script src="../lib/knockout-2.0.0.js"></script>

    <script>
        $(function () {
            $("#itemNumber").change(function() {
                console.log('itemNumber');
            });

            //create The view Model
            var product1 = {
                  id: 1002,
                  itemNumber: "T110",
                  model: "Taylor 110",
                  salePrice: 699.75
                }; 
            ko.applyBindings(product1);
        });
    </script>
</head>
<body >
    <input data-bind="value: itemNumber" type="text"  id="itemNumber" />
</body>
</html>

When i run the page T110 appears in my input box and when i change the value the console message is shown as i expect.

But notice it does not fire when applyBindings is called during the page load as I would expect…

So what mechanism does it use to modify the input element’s value? And what i am really looking for is some way to detect this in the element itself as this is a control and I would like to copy the real value from a hidden field to the right place but maintain any values stuck to it…

Thanks

  • 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-30T07:23:18+00:00Added an answer on May 30, 2026 at 7:23 am

    You can see for yourself, reading the source for the value binding.

    The default event for handling changes is the change event but that is configurable.

    Also, a great way to learn KnockoutJs is to go through the tutorials.

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

Sidebar

Related Questions

Trying to understand the options for will_paginate's paginate method: :page — REQUIRED, but defaults
Trying to understand Ruby a bit better, I ran into this code surfing the
After trying to understand why client code is not rendered in a page (injected
Trying to understand why this doesn't work. I keep getting the following errors: left
Trying to understand this binding process of the WPF. See the code at the
While trying to understand how a web server worked, I came accross this: //myfile.js
Trying to understand how CoffeeScript instance and class variable works I came with this
I trying to understand this piece of code Function.prototype.method = function (name, fn) {
Trying to understand this open source app on github, it has a gem file:
just trying to understand ObjectiveC a bit better. Shouldn't this two expressions be 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.