title: Failed to load resource error for ajax call in javascript
body: <p>I know there are many such questions, i tried those answers but my problem is not solved. </p>
  
  <p>Am sending string to the webservice. But, values are not inserted in tables on server, whereas if I run the webservice in browser, it inserts the values. So where is the problem exactly?</p>
  
  <p><a href="https://coderwall.com/p/5nccwq" rel="nofollow noreferrer">https://coderwall.com/p/5nccwq</a></p>
  
  <p><a href="https://stackoverflow.com/questions/4390134/failed-to-load-resource-under-chrome">Failed to load resource under Chrome</a></p>
  
  <p>I referred the second link and tried to change according to the first answer in it, but doesn't work.</p>
  
  <p>I tried to execute it in incognito mode, but no use.</p>
  
  <p>Please help with your answers.</p>
  
  <pre><code>var targeturl="http://hostname/projfolder/webservice.php?orderList="+str_table;
          console.log(targeturl);
  $.ajax({
          type:"POST",
          url:targeturl,
          contentType: "application/json; charset=utf-8",
          crossDomain:true,
          dataType:'jsonp',
          success:function (data)
             {
              alert("in success");
              var parsedata=JSON.parse(JSON.stringify(data));
              alert("parsedata: "+parsedata);
              var stats=parsedata["Status"];
              alert("logindata: "+stats);
  
              if("1"==stats)
              {   
                  alert("success");
              }
              else
              {
                  alert("failed");
              }
            }
  });
  </code></pre>
  
  <p>Actually I had forgot adding <code>http://</code>, but I did it now, now here I get <code>Unexpected token :</code> error</p>
  
  <p>I used many web services for the same project but did not go through such issue.</p>