title: Why can't i use a var inside a .get()
body: <p>I'm trying to use .get() to refresh my page without actually refreshing or reloading. But I can't seem to get it to load the variable I've set up to load its own url. Here is what I have.</p>
  
  <pre><code>setTimeout(function() {
      var loc = window.location.href;
      pathName = ".." + loc.substring(50, loc.href.lastIndexOf('.') + 4);
      alert(pathName);
  
      $.get("pathName", function(data) {
          $('#pagebody').html(data);
      });
  }, 2000);
  </code></pre>
  
  <p>The alert gives me what I want which is ../out/G56.HTM, when I type in ../out/G56.HTM it works fine, the problem is there are 56 different pages from G1 to G56.HTM. I've also tried have it load only G56.HTM that doesn't work either. However if it type in $.get('G56.HTM', function...) that works as well, I can't get it to read the variable???</p>