title: Pass a variable to Ajax URL
body: <p>I'm trying to add a variable (integer) in URL to be used in an Ajax request:</p>
  
  <p>In my HTML, I have:</p>
  
  <pre><code>&lt;span class="user"&gt;15&lt;/span&gt;
  </code></pre>
  
  <p>And the script:</p>
  
  <pre><code>$('#fileupload').click(function () {
      $(this).fileupload({
          dataType: 'json',
          done: function (e, data) {
              $.each(data.result.files, function (index, file) {
                  if (file.error != null) {
                      $console.text(file.error);
                  }
                  var user = parseInt($(".user").text(), 10);
                  //Open the uploaded file//
                  $.ajax({
                      url: "files/" + user + '/' + file.name,
                      dataType: 'json',
                      type: 'GET',
                      success: function (res) {
                          handsontable.loadData(res.data);
                          $console.text('Loaded file: ' + file.name);
                      }
                  });
              });
          }
      });
  });
  </code></pre>
  
  <p>However, the variable (15) isn't being passed to the URL, I get the error:</p>
  
  <pre><code>/files/NaN/data.json
  </code></pre>
  
  <p>I know I'm doing something stupid, and searched everywhere, but what is it?</p>