title: Knock Out data binding
body: <p>I have a question about data binding using knockout. </p>
  
  <p>Here's the problem: I have a table, I what I would like to do is that when a row in table is clicked, I want the values of the row to appear in the input fileds which are located above the table. </p>
  
  <p>so here'</p>
  
  <pre><code>&lt;tbody data-bind="foreach: customers"&gt;
                          &lt;tr data-bind="click: doSomething"&gt;     
                              &lt;td data-bind="text: date"&gt;&lt;/td&gt;
                              &lt;td data-bind="text:staff"&gt;&lt;/td&gt;
                              &lt;td data-bind="text: ftype"&gt;&lt;/td&gt;
                              &lt;td data-bind="text: value"&gt;&lt;/td&gt;
                              &lt;td data-bind="text: message"&gt;&lt;/td&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
  </code></pre>
  
  <p>In my viewmodel, I have the following function: </p>
  
  <pre><code>doSomething: function(data) { 
          var self = this;      
          self.date(data.date);        
          self.staff(data.staff); 
          self.ftype(data.ftype);
                     self.value(data.value);
                     self.message(data.message);  
  
      }
  </code></pre>
  
  <p>Here's the  error I am getting: </p>
  
  <pre><code>["Unable to parse bindings.↵Message: ReferenceError:… is not defined;↵Bindings value: click: doSomething", "views/myView/index", Object]
     0: "Unable to parse bindings.↵Message: ReferenceError: doSomething is not          defined;↵Bindings value: click: doSomething"
   1: "views/myView/index"
    2: Object
  length: 3
   __proto__: Array[0]
  </code></pre>
  
  <p>Let me know if I need to provide any more details. I will appreciate your help fplks!</p>