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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:23:27+00:00 2026-06-06T01:23:27+00:00

Am newbie in KnockoutJs , i tried all tutorials on its official website. Now

  • 0

Am newbie in KnockoutJs, i tried all tutorials on its official website.
Now i want to run all the practical tutorial on my local machine, i have downloaded knockout-2.1.0.js.

I tried this code but its not working on local machine

index.php
---------
<!DOCTYPE html>
<html>
    <head>
        <title>Knockout</title>
        <script src="js/knockout-2.1.0.js"></script>
        <link rel="stylesheet" href="css/styles.css" />
        <script>
        // This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
        function AppViewModel() {
            this.myname= ko.observable("Frank");
            this.myage= ko.observable("26");

            this.mydetails= ko.computed(function() {
                var x;
                return this.myname() + ", and my age is " + this.myage() + 'yr. old.';
            }, this);

            this.capitalizeMyName = function() {
                var currentVal = this.myname();        // Read the current value
                this.myname(currentVal.toUpperCase()); // Write back a modified value
            };
        }

        // Activates knockout.js
        ko.applyBindings(new AppViewModel());
        </script>
    </head>
    <body>
    <p>New Application</p>
        <!-- This is a *view* - HTML markup that defines the appearance of your UI -->
        <p>My Name: <strong data-bind="text: myname"></strong></p>
        <p>My Age: <strong data-bind="text: myage"></strong></p>

        <p>My Name: <input data-bind="value: myname" /></p>
        <p>My Age: <input data-bind="value: myage" /></p>

        <p>Full Detalis: <strong>Hi, my name is <text data-bind="text: mydetails"></strong></p>

        <button data-bind="click: capitalizeMyName">Go caps</button>
    </body>
</html>

If Someone has knowledge or idea about this, then suggest me. 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-06-06T01:23:29+00:00Added an answer on June 6, 2026 at 1:23 am

    http://code.jquery.com/jquery-1.7.2.min.js

    you need to include Minified file : js/jquery-1.7.2.min.js

    And put your viewmodel code between:
    
      $(document).ready(function(){
    
      // This is a simple *viewmodel* - JavaScript that defines the data and behavior of
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie question since I'm not up to speed using maven at all. I'm trying
(Newbie DBUnit question Alert!) It appears that DBUnit for each table 'deletes all the
Newbie here programming my first app (having made several tutorial apps). I am using
Newbie Java question - On all the posts for Auto Scaling the Text view,
Newbie still learning, been trying to search and hack code together for hours now,
Newbie question. I want to do something like: SELECT c1,c2,c3 FROM TABLE t1 UNION
Newbie to C++ but I am a Java programmer. Trying to learn C++ now.
Newbie :( Tweaking my way through tutorials but 36 hours can't figure this one
Newbie IIS question: I want to setup HTTPS access for my XHTML page (not
Newbie using mongo 2.0.1 32-bit on windows tried testing out shards as follows: (4)

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.