title: Having issue showing the ajax result in a textbox
body: <p>I want to do is show my ajax result in my count inputbox.</p>
  
  <p>I tried to use <code>alert()</code> to know if my AJAX return a value and it gives value.</p>
  
  <p>My problem is it doesnt show in my count inputbox the result in my AJAX.</p>
  
  <p><strong>script:</strong></p>
  
  <pre><code>$(document).ready(function(){
  var countTimer = setInterval(
          function ()
          {
              codeValue();        
          }, 500);
  
  function codeValue(){
  
          var data = {};
          data.countValue = $('#countValue').val();
  
          $.ajax({
              type: "POST",
              url: "codeTime.php",
              data: data,
              cache: false,
              success: function (result) {
              alert(result);
              $("#count").val(result.user_code);
  
              }
          });
  
  };
  
  });  
  </code></pre>
  
  <p><strong>response:</strong></p>
  
  <pre><code>{"user_code":2} 
  </code></pre>