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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:45:00+00:00 2026-05-25T01:45:00+00:00

I have following sample code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd> <html> <head>

  • 0

I have following sample code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
   <script type="text/javascript" src="../knockout-1.2.1.js"></script>
   <script type="text/javascript" src="../knockout.mapping.js"></script>
</head>
<body>
   <div>Nested Object Value1 <input data-bind="value: NestedObject.Value1" type="text" /></div>
   <div>Value2 <input data-bind="value: Value2" type="text" /></div>

<hr/>
<div data-bind="text: ko.toJSON(viewModel)"></div>

<script type="text/javascript">
   var initialData = {"NestedObject":{"Value1":"Dummy value"}, "Value2" : "Hello world"};

   var viewModel = ko.mapping.fromJS(initialData);

   viewModel.ParameterUpdatedDependentObservable = ko.dependentObservable(function() {
        alert("dependentObservable fired");
    }, viewModel);

   ko.applyBindings(viewModel); // Makes Knockout get to work
   </script>
</body>
</html>

What I expected is that to see a popup to alert value is changed by user. When I run it, the popup shows up only once when page is initially loaded. Afterwards I can make value update but alert is no long triggered.

Any clue why?

  • 1 1 Answer
  • 1 View
  • 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-25T01:45:01+00:00Added an answer on May 25, 2026 at 1:45 am

    dependentObservables track the observables that have their values accessed during evaluation to create dependencies.

    In your case, your dependentObsevable does not access any observables. If you access the value of one or more of your observables in your code, then you will see it trigger whenever any of its dependencies are updated.

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

Sidebar

Related Questions

I have the following simple code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
I have uploaded the following simple HTML code to http://losthobbit.net/temp/anchor.html <!DOCTYPE HTML PUBLIC -//W3C//DTD
I have the following code sample that im trying to wrap my head around
I have the following sample piece of code, public class test implements Runnable{ public
I have been confused about ORM since I see the following sample code: public
I have the following sample code which doesn't seem to want to run. import
I have the following code sample: float val = 16777216.0F; var badResult = Convert.ToDecimal(val);
I have a Dictionary bound to DataGridView by using following sample code. DataGridView bound
I have downloaded sample code from Apple Center.I also have gone through following question:
I am new to Emacs, and I have the following code as a sample.

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.