I have made a WCF REST service which returns the response in JSON format and now I want to
call it from javascript.But when I try to call it I couldn't view any response.
To make a javascript call I have written this:
<script src="Scripts/jquery-1.5.2.min.js" type="text/javascript">
</script>
<script language="javascript" type="text/javascript">
function Greeting() {
$("#btnWCFREST").click(function() {
$.ajax({
url:"http://localhost:8732/Services/RoleService/json/Role/provider",
type:"GET",
dataType:"json",
contentType:"application/json; charset=utf-8",
successs: function(msg) {
alert(msg);
},
Error: function(msg) {
alert("Failed");
}
});
}
}
</script>
How can I get the response. Where Am I going wrong?