title: how to access php web service with Jquery ajax
body: <p>I have a login webservice and i am try to access using Jquery Ajax. but i am not able to access.
  I have use many method but not success. please my help</p>
  
  <ol>
  <li><p>using  getJSON</p>
  
  <pre><code>$("#login").click(function () {
      var url = 'http://localhost:8080/vrm/web_services/login?data=[{"email":"gaurav.gautam@mailinator.com","password":"123456","device_token":"GLKOS58GDG549853JSFJSBMSMSG"}]';
      jQuery.getJSON(url+"&amp;callback=?", function(data) {
      alert("Success" + data.id);
  });
  </code></pre></li>
  <li><p>using .ajax()</p>
  
  <pre><code>var markers = [{ "email": "gaurav.gautam@mailinator.com", "password": "123456","device_token":"GLKOS58GDG549853JSFJSBMSMSG" }]
  $.ajax( {
    //  url: 'http://localhost:8080/vrm/web_services/login?data=[{"email":"gaurav.gautam@mailinator.com","password":"123456","device_token":"GLKOS58GDG549853JSFJSBMSMSG"}]',
    uri:'http://localhost:8080/vrm/web_services/login',
    type: "GET",
      contentType: "application/json; charset=utf-8",
      dataType: "jsonp",
      data:  JSON.stringify({ data: markers }),
      processdata:true,
      jsonpCallback: 'mycallback',
      success : function(data) {
  
         var json = $.parseJSON(data);
         $('#items').html(json);
         alert(json);
  
      },
      error : function(req, status, ex) {
  
        alert("Lol" + ex);
  
      }
      });
  </code></pre></li>
  </ol>
  
  <p>I have also use dataType: "json" but not getting request.status 0
  and when use dataType: "jsonp" getting error 'invalid label' </p>