title: Make cross-domain ajax JSONP request with jQuery
body: <p>I would like to parse JSON array data with jquery ajax with the following code:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;title&gt;Sample&lt;/title&gt;
  &lt;script type="text/javascript" src="Scripts/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      var result;
      function jsonparser1() {
          $.ajax({
              type: "GET",
              url: "http://10.211.2.219:8080/SampleWebService/sample.do",
              dataType: "jsonp",
              success: function (xml) {
                  alert(xml.data[0].city);
                  result = xml.code;
                  document.myform.result1.value = result;
              },
          });
      }        
  &lt;/script&gt;    
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p id="details"&gt;&lt;/p&gt;
  &lt;form name="myform"&gt;
      &lt;input type="button" name="clickme" value="Click here to show the first name" onclick=jsonparser1() /&gt;
      &lt;input type="text" name="result1" readonly="true"/&gt;        
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My JSON data is:</p>
  
  <pre><code>{"Data":   [{"Address":"chetpet","FirstName":"arulmani","Id":1,"LastName":"sathish","City":"chennai"},{"Address":"ramapuram","FirstName":"raj","Id":2,"LastName":"nagu","City":"chennai"},{"Address":"ramapuram","FirstName":"raj","Id":2,"LastName":"nagu","City":"chennai"},{"Address":"ramapuram","FirstName":"ramaraj","Id":3,"LastName":"rajesh","City":"chennai"},{"Address":"ramapuram","FirstName":"yendran","Id":3,"LastName":"sathi","City":"chennai"}],"Code":true}
  </code></pre>
  
  <p>But i am not getting any output...anybody please help out...</p>