hi all,
I am created one web services my web services name "HostingService.asmx". in my web services having no of methods. am added one html page in same project, now am calling json web services using ajax,jquery. its working fine. my script code is
<script language="javascript" type="text/javascript">
$("#btnok").live("click", function () {
var username = $("#name").val();
var password = $("#password").val();
var clientid = $("#clientid").val();
$.ajax({
type: 'POST',
url: 'HostingService.asmx/SETusers',
data: "{username:" + JSON.stringify(username) + ",password:" + JSON.stringify(password) + ",clientid:" + JSON.stringify(clientid) + "}",
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (data, status) {
alert(data.d);
}
});
});
</script>
this script code working fine. after deploying my web services and assign to one port/IP address in server. like "http://192.168.1.100:85/HostingService.asmx?op=SETusers". this is my web services url. now am creating one html page with out project using notepad. and adding the same code just modified the url in ajax method. my url like
url: "http://192.168.1.100:85/HostingService.asmx/SETusers" and
"http://192.168.1.100:85/HostingService.asmx?op=SETusers" am tried in different ways. but my code is not working in html page. my alert box shows the empty message.
using scripts are
<script src="Scripts/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
please tel me, how to find the error, how to solve my problem.
thanking you.