title: Assigning AJAX response for two separate DIV tags
body: <p>This is my ajax call code..</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){                   
          $('#itemcode').blur(function(){
                  var itemcode = $(this).val();
  
                  $.ajax({
                          type: "POST",
                          url:'ajax.php',
                          data: {'itemcode' : itemcode} ,
                          cache: false,
                          success: function(data) {
                              alert(data)
                          $("#desc").val(data);
                          $("#bal").val(data);
                          }
                      });
              });
  
      });
   &lt;/script&gt;
  
  include "db.php";
  $itemcode=$_POST['itemcode'];
  
  $sql="select * from itemmaster where Item_Code='$itemcode'";
  $result = mysql_query($sql, $con);
  while($row = mysql_fetch_array($result)) {
  echo $row['Item_Desc'];
  echo $row['Balance_Stock'];
  }
  </code></pre>
  
  <p>This is simple html form..</p>
  
  <pre><code>&lt;form action="add.php" method="post"&gt;
  &lt;table style="border: 1px solid black;padding:20px;"cellspacing="1px"&gt;
  &lt;/br&gt;&lt;/br&gt;
  &lt;tr&gt;
  &lt;td&gt;Issue No:&lt;/td&gt; &lt;td&gt;&lt;input name="issueno" type="text" id="issueno"/&gt;&lt;/td&gt;
  &lt;td&gt;Issue Date:&lt;/td&gt; &lt;td&gt;&lt;input name="issuedate" type="date" id="issuedate"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/br&gt;&lt;/br&gt;&lt;tr&gt;&lt;/tr&gt;
   &lt;tr&gt;
   &lt;td&gt;Item Code:&lt;/td&gt; &lt;td&gt;&lt;input name="itemcode" type="text" id="itemcode" /&gt;&lt;/td&gt;
   &lt;td&gt;Description:&lt;/td&gt; &lt;td&gt;&lt;input name="des" type="text" style="width:250px; height:23px" id="desc"/&gt;&lt;/td&gt;
   &lt;td&gt;Bal Quantity:&lt;/td&gt; &lt;td&gt;&lt;input name="bal" type="text" id="bal"/&gt;&lt;/td&gt;
   &lt;/tr&gt;&lt;/br&gt;
  &lt;tr&gt; &lt;td&gt;Issue Quantity:&lt;/td&gt; &lt;td&gt;&lt;input name="issuequ" type="text" id="issuequ"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/br&gt;&lt;tr&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Remark:&lt;/td&gt; &lt;td&gt;&lt;input name="remark" type="text" style="width:250px; height:23px" id="remark"/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/br&gt;
  
  &lt;tr&gt;&lt;td colspan="6"&gt;&lt;center&gt;&lt;input type="submit" value="submit"&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When I alert(data) I am getting this samsung20.00. where samsung is description and 20.00 is bal. I want to assign description desc id an bal to bal id. So How do I do that??</p>