title: How to call external webservice using jquery "jsonp"?
body: <p>I had a previous question <a href="https://stackoverflow.com/questions/727183/can-jquery-ajax-call-external-webservice">can jquery ajax call external webservice?</a></p>
  
  <p><br/> and some good developers answered me to use jsonp, but i don't know how to use it, i am trying to call my service using this code:<br/></p>
  
  <pre><code>$.ajax({
              type: "POST",
              url: "http://localhost:1096/MySite/WebService.asmx?callback=?",
              data: "{}",
              contentType: "application/json; charset=utf-8",
              dataType: "jsonp",
              success: function(msg) {alert(msg);}
              });
  </code></pre>
  
  <p><br/>
  and this is my service code:<br/></p>
  
  <pre><code>[WebMethod]
  public string HelloWorld() {
      return "Hello World " ;
  }
  </code></pre>
  
  <p><br/></p>
  
  <p>anyone have examples or can explain this issue for me?</p>
  
  <p><strong>UPDATE</strong>:<br/>
  I wrote the code again to be like this:<br/></p>
  
  <pre><code>$.getJSON("http://localhost:1096/YourShoppingTest1/WebService.asmx/HelloWorld?jsonp=?",{name:"test"},
      function(data){
      alert(data.x);
      });
  </code></pre>
  
  <p><br/> and the service like this:<br/></p>
  
  <pre><code>[WebMethod]
  public string HelloWorld(string name)
  {
      return "( {\"x\":10 , \"y\":100} )";
  }
  </code></pre>
  
  <p><br/></p>
  
  <p>But it always give me this error when back: "missing ; before statement
  [Break on this error] ( {"x":10 , "y":100} )"
  <br/></p>
  
  <p>and never call the success function, can anyone help with that?</p>