title: Binding from database using Knockout.js
body: <p>I am trying to learn knockout.js and do a look up from a database on a page load. I have everything working except, after the successful database retrieval, the textarea is not being updated with the data from the database.Can someone show me what I'm doing wrong with the binding?</p>
  
  <pre><code>&lt;textarea id="taProgramOutcome" data-bind="value: programOutcomeText" rows="12" cols="20"&gt;&lt;/textarea&gt;
  
  
  $(function() {
  function AppViewModel() {
      this.programOutcomeText = "This is a review"; //initial binding works
  
      var pageUrl = "/testapp/Service1.asmx";
  
      $.ajax({
          type: "POST",
          url: pageUrl + "/GetReviews",
          data: "{'disciplineRecordId': '" + 38 + "'}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (result) {         //Database returns records, but the binding does not work.
              this.programOutcomeText = 
  ko.observable(result.d[0].disciplineOutcome);
          },
          error: function (XMLHttpRequest, textStatus, errorThrown) {
              alert(textStatus);
          }
      });
  }
  
  ko.applyBindings(new AppViewModel());
  });
  </code></pre>