Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created one html page,in that using jquery i have call webservice .
It will work locally ,but on remote server it can not works.
This is the code using in javascript
PHP
$.ajax({

  type: "POST",
  url: "http://example.com/test.asmx/helloworld",
  data: "{'bannerid':'" + id + "'}",
  contentType: "application/json; charset=utf-8",
  dataType: "json",

  success: function(msg) {

   //$(divid1).removeClass('loading');
   $(divid1).html(msg)

  }
});
Posted
Updated 27-Sep-11 15:09pm
v2
Comments
Ed Nutting 27-Sep-11 13:08pm    
Why do you have a file name followed by more url??? Use query parameters! Your URL shouldn't work so far as I'm aware. What you want is something more like: "http://example.com/test.asmx?Mode=helloworld". Apart from that I'm not sure that "charset=utf-8" is allowed in the contentType header - it has it's own separate header - Google it! If those issues don't solve your problem I'm not sure what will...

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900