title: A strange issue with a jQuery script
body: <p>I have the following jQuery script:</p>
  
  <pre><code>$(document).ready(function() {
          $.ajax({
              url: 'temp.ajax.php',
              type: 'GET',
              success: function(data){
                  $("#total_plus_aditional").val(data);                   
              }
          });
  
          tempTotal = parseFloat($("#total_plus_aditional").val());
  
          $("#cost_valoare").change(function(){                   
              var sum = parseFloat(tempTotal) + parseFloat($("#cost_valoare").val());
              $("#total_plus_aditional").val(sum);  
          });
  });
  </code></pre>
  
  <p>Now, here's what I want to do: the temp.ajax.php returns a float value. First, that float value is assigned to an input field in the html so the user can see the number. Then, if the user enters a number in another input field, I would like to make the sum of those two numbers and rewrite the value in the first input field. </p>
  
  <p>The problem is that if I write a number in a second field, the content of the first field (with the float number returned by ajax call) turns to NaN. </p>
  
  <p>Why is this happening?</p>
  
  <p>P.S. I'm saving the value returned by the ajax call in a separate variable because I would like to have the same value if the user changes his mind and enters another value in the second field after he already entered one.</p>