title: Changing a value from another field
body: <p>I'm trying to change a value that was set from javascript(jQuery) from another field. I want to target only one word from that value. Here's my code (<a href="http://jsfiddle.net/zL4pc90d/" rel="nofollow">http://jsfiddle.net/zL4pc90d/</a>):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;jQuery get input Text value example&lt;/title&gt;
    &lt;script
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"
    type="text/javascript"&gt;&lt;/script&gt;
    &lt;script
    src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"
    type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      $(function() {
        $("#select_car").change(function()
        {
          if ($("#select_car").val() == "")
          {
            terms = "";
          } else if ($("#select_car").val() == "Honda")
          {
            terms = "One year lease on &lt;car&gt;.";
          } else if ($("#select_car").val() == "Toyota")
          {
            terms  = "Two year lease on &lt;car&gt;.";
          } else if ($("#select_car").val() == "Ford")
          {
            terms = "Three year lease on &lt;car&gt;.";
          }
          $("#contract").val(terms);
        });
      }); 
    &lt;/script&gt;
    &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div&gt;
      &lt;form&gt;
        &lt;fieldset&gt;
          &lt;legend&gt;jQuery Get and Set input Text value&lt;/legend&gt;
          &lt;p&gt;
            &lt;label for="carModel"&gt;
              Car Model:
            &lt;/label&gt;
            &lt;input id="myInputText" type="text" name="inputBox" /&gt;
          &lt;/p&gt;
          &lt;p&gt;
            Make:
            &lt;select id="select_car"&gt;
              &lt;option value&gt;&lt;/option&gt;
              &lt;option value="Honda"&gt;Honda&lt;/option&gt;
              &lt;option value="Toyota"&gt;Toyota&lt;/option&gt;
              &lt;option value="Ford"&gt;Ford&lt;/option&gt;
            &lt;/select&gt;
          &lt;/p&gt;
          &lt;p&gt;
            &lt;label for="contract"&gt;
              Contract:
            &lt;/label&gt;
            &lt;input id="contract" type="text" name="outputBox" readonly="readonly" /&gt;
          &lt;/p&gt;
        &lt;/fieldset&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>For the new values, wherever it says "", I'd like it to be what I enter in the first input field. I'd prefer to do it dynamically too, so maybe calling the keyup function or something. How would I do this?</p>