title: JQuery ajax call - can't pass url parameter
body: <p>Sorry for this "newbe" question.</p>
  
  <p>Here is my problem:</p>
  
  <p>I am using JQuery 1.8.2 and I am trying to issue an ajax request:</p>
  
  <p>This is working:</p>
  
  <pre><code>    $.ajax({
          url: 'http://191.168.0.133/rest/interface/test/1',
          dataType: 'json',
          timeout: 5000,
          success: function(data, status){
                  $.each(data, function(i,item){
                          var registrationInfo = '&lt;h1&gt;' + item.testID+ '&lt;/h1&gt;';
                          output.append(registrationInfo);
                      });
                  },
          error: function(){
                  output.text('There was an error loading the data.');
              }
          });
  </code></pre>
  
  <p>But I want the URL Parameter to be passed by a variable. The folloing is not working, but always ending up in the error function "There was an error loading the data."</p>
  
  <pre><code>    var testURL = 'http://191.168.0.133/rest/interface/test/1';
      $.ajax({
          url: testURL,
          dataType: 'json',
          timeout: 5000,
          success: function(data, status){
                  $.each(data, function(i,item){
                          var registrationInfo = '&lt;h1&gt;' + item.testID+ '&lt;/h1&gt;';
                          output.append(registrationInfo);
                      });
                  },
          error: function(){
                  output.text('There was an error loading the data.');
              }
          });
  </code></pre>
  
  <p>I am going bonkers over this. Can anyone give me a hand?
  Thanks in advance ...</p>