title: How to fill automatically another text box value from one text box value using ajax
body: <p>Hi I wanted to place search box like just dial site when we type the company name it will automatically fill the city name in the another text box</p>
  
  
                          
                              " onfocus="javascript:this.value='';" onblur="javascript: if(this.value==''){this.value='';}" onKeydown="javascript: if (event.keyCode==13)serachProduct();"/>
                          
                      
  
  <pre><code>                &lt;div class="textCurve1" style="float:left;margin-left:10px;"&gt;
                      &lt;div class="selectsSR"&gt;
                          &lt;input type="text" id="cityname" name="cityname" onKeydown="javascript: if (event.keyCode==13)serachProduct();" value="&lt;?php if(isset($cityName)){echo ucfirst($cityName);}else{echo"City";} ?&gt;" onfocus="javascript:this.value='';" onblur="javascript: if(this.value==''){this.value='&lt;?php if(isset($cityName)){echo ucfirst($cityName);}else{echo"City";} ?&gt;';}"/&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>SELECT select_company.company_name,select_city.city FROM select_company LEFT JOIN select_city ON(select_company.city=select_city.id) WHERE select_company.company_name LIKE ".$this->db->escape($company."%")." LIMIT 10"</p>
  
  <p>want to update the city field text box automatically</p>