Click here to Skip to main content
15,892,643 members

Comments by Kartheek.chakrala (Top 15 by date)

Kartheek.chakrala 20-Mar-13 5:12am View    
JSONP is for Get Request we can't post data with it
Kartheek.chakrala 18-Sep-12 6:19am View    
from html
$('#btn_test').click(function () {
$.ajax(
{
type: "POST",
url: "http://localhost:5739/asmxservicestestservice.asmx/HelloWorld",
data: '{ "text": "Kartheek"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
error: OnError

});

function OnSuccess(data, status) {
alert(data.d);

};
function OnError(msg) {
alert('error = ' + msg.d);
}

});


and my web service which is running on http://localhost:5739


[WebMethod ]
[ScriptMethod( ResponseFormat = ResponseFormat.Json)]
public string HelloWorld(string text)
{
return "Hello World" + text;
}
Kartheek.chakrala 13-Sep-12 8:57am View    
i found the problem but not the solution
Problem is Cross Domain Webservice Call

solution till now dnt know. If any body have simple solution ?
Kartheek.chakrala 13-Sep-12 7:40am View    
Undefined only i am getting nothing any message
Kartheek.chakrala 13-Sep-12 7:19am View    
always it is going in to onError