title: knockout send value from input to function
body: <p>I have a text box and a button and I want to send the value from the textbox to a function when the button is clicked cant seem to figure it out.</p>
  
  <pre><code>      Reg:&lt;input type="text" placeholder="Enter Reg" data-bind="text: search"  /&gt;
  &lt;button  class="btn btn-danger" data-bind="click: function () { GJobs(search) }" &gt;Get Jobs&lt;/button&gt;
  </code></pre>
  
  <p>function in the view model </p>
  
  <pre><code>   self.GJobs = function (search) {
          GetJobs(search)
      }
  </code></pre>
  
  <p>ajax call </p>
  
  <pre><code>   function GetJobs(search) {
          $.ajax({
              type: "GET",
              url: 'api/mechanicphone',
              data: { reg: search},
              dataType: 'json',
              contentType: 'application/json',
              success: function (data) {
                  self.Jobs(data);
              },
              error: function (data) {
                  $('#MechMobile').html('&lt;h3&gt;Error in retrieval&lt;/h3&gt;');
              }
          });
      }
  </code></pre>
  
  <p>the reg passed is coming null on the get when  i debug</p>