Hi,
I am calling a web service through the Jquery but it is not working and giving error.
below is my code
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js" type="text/javascript">
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#sayHelloButton").click(function(event) {
$.ajax({
async: "false",
type: "POST",
url: "ModuleName/WebServices/WebService1.asmx/HelloToYou",
data: "{'strEmail': '" + $('#name').val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
AjaxSucceeded(msg);
},
error: AjaxFailed
});
});
});
function AjaxFailed(result) {
result.status + ' ' + result.statusText);
}
function AjaxSucceeded(result) {
result.d);
}
function onSucceeded(result, userContext, methodName) {
// result);
ccess');
}
function onFailed(error, userContext, methodName) {
An error occurred");
}
</script>
my .ascx code
<input id="name" />
<input id="sayHelloButton" value="Say Hello"
type="button" />
it is always go in error block.
this same code is working in DNN 5.3.
Please provide me some solution for this
Regards
Reetesh