Hi veerendra Kumar,
Yes, I saw above aritical.
but before that i moved one more step
here
my html :
<html>
<head>Getting wcf data</head>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script>
function Button1_onclick()
{
var pid = TextArea2.innerHTML;
$.support.cors = true;
$.ajax({
type: "GET",
url:"http://localhost:8888/Service1.svc/getempdetails",
data : JSON.stringify({ eid: eid}),
contentType :"application/json",
dataType : "xml/json",
ProcessData: false,
error: function (XmlHttpRequest, status, error) { alert('Error from Ajax Method: ' + error); },
success: function (msg)
{
var theRealData = msg.d;
document.getElementById("welcomeMsg").innerHTML += theRealData;
}
});
}
</script>
<body>
<textarea id="TextArea2" name="S2" rows="2"></textarea> <br />
<input id="BtnPatient" type="button" value="Submit"
onclick="javascript:Button1_onclick()" /><br />
</body>
</html>
when i was executing this :
getting an error as "Bad request"
this error getting from here " error: function (XmlHttpRequest, status, error) { alert('Error from Ajax Method: ' + error); },"
please let me know where i did mistake.
i am sure there is no issues in WCF service.
Thanks in Advance
nareshrajuu