title: Display JSON response text from ajax in jQuery Template
body: <p>I need to pass the response from ajax call to a jquery template.The response json is not malformed.I have checked this by using alert statements in the ajax fn.When the response is passed to the template,it does not get recognized.For example,when I use ${field1} in template,nothing gets displayed in the browser.No error messages are displayed at the browser.Can someone help me fix this issue?</p>
  
  <p>Json response from server:</p>
  
  <pre><code>    { 
          "field1": 23432434, 
          "field2": "sometext",
      }
  </code></pre>
  
  <p>Ajax fn:</p>
  
  <pre><code>    function getinfo(uri)
      {
          jQuery.ajax({
          url:    'http://{{request.META.SERVER_NAME}}'+uri,
          success: function(info) {
                    return info;
                },
          async:   false,
          dataType: 'jsonp'
          });
       }
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>    &lt;script id="infoTemplate" type="text/x-jQuery-tmpl"&gt;
              &lt;div&gt;${field1}&lt;/div&gt;
     &lt;/script&gt;
  </code></pre>
  
  <p>Code to Bind JSON to template:</p>
  
  <pre><code>&lt;script id="Template1" type="text/x-jQuery-tmpl"&gt;      
        {{tmpl(getinfo(uri)) "#infoTemplate"}} 
  &lt;/script&gt;
  </code></pre>
  
  <p>Note: I can't use the following method to bind JSON with template.That's a long story.</p>
  
  <pre><code>function getinfo(uri)
  {
      $.getJSON('http://{{request.META.SERVER_NAME}}'+uri, function(data) {
           $("#infoTemplate").tmpl(data).appendTo("#somedivid");
     });
  }
  </code></pre>