Saimactitty
New Member
I have a service and it is returning json in the following format\[code\]Data { "TerminalID": 21, "TerminalName": "NewTested", "PortID": 27, "PortName": "Badu Island", "EffectiveStart": "2013-03-20T00:00:00", "EffectiveEnd": "2013-03-23T00:00:00", "ServiceID": 2}\[/code\]and in my aspx page my code is:\[code\]<script type="text/javascript"> $(document).ready(function () { $("#divImageGo").click(function () { var valId = 2; $.ajax({ type: "GET", url: "VoyageOneService.svc/BindVoyageDetails" + valId, //data: '{"ServiceID":"2"}', processData: false, contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { ServiceSucceeded(result); }, error: function (msg) { $("#errorDiv").text(msg); } }); }); });\[/code\]And success does the following: \[code\]function ServiceSucceeded(data) { alert("Success"); for (var i = 0; i < data.d.length; i++) { $("#dlistVoyageDetails").append("<tr><td>" + data.d.TerminalName + "</td><td>" + data.d.PortName + "</td><td>" + data.d.EffectiveStart + "</td></tr>" + data.d.EffectiveEnd + "</td></tr>"); } }function ServiceFailed(xhr) { if (xhr.responseText) { var err = xhr.responseText; if (err) error(err); else error({ Message: "Unknown server error." }) } return; }\[/code\]In this ..,[*]Iam getting My service called[*]Iam getting my Return value of json [*]Iam getting the Success fired with its alert msgBut I am unable to get the result. When I checked my alert with the result I am getting NULL