function InfoByDate(){
var divToBeWorkedOn = "#AjaxPlaceHolder";
var webMethod = "http://abc:8888/Service.asmx/xyz";
var txt_CNIC = replaceAll("-","",$("[title='abc']").val());
var parameters = "{'abc':'"+ txt_abc + "', 'status':'2'}";
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
if(typeof msg.d[0] !== "undefined") {
$("[title='Name']").val(msg.d[0]['az']);
$("[title='xyz']").val(msg.d[0]['ax']);
}
else
{
$("[title='Name']").val("");
$("[title='xyz']").val("");
}
},
error: function(e){
$("[title='Name']").val("");
}
});
}
var divToBeWorkedOn = "#AjaxPlaceHolder";
var webMethod = "http://abc:8888/Service.asmx/xyz";
var txt_CNIC = replaceAll("-","",$("[title='abc']").val());
var parameters = "{'abc':'"+ txt_abc + "', 'status':'2'}";
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
if(typeof msg.d[0] !== "undefined") {
$("[title='Name']").val(msg.d[0]['az']);
$("[title='xyz']").val(msg.d[0]['ax']);
}
else
{
$("[title='Name']").val("");
$("[title='xyz']").val("");
}
},
error: function(e){
$("[title='Name']").val("");
}
});
}
No comments:
Post a Comment