Gaurav Raj

Gaurav Raj

  • 1.4k
  • 475
  • 38.8k

I am unable to call web service using jquery

Jun 23 2017 2:16 AM
I am unable to call web service using jquery
this is my code
<script type="text/javascript">
$(document).ready(function () {
function loadData(currentPage) {
$.ajax({
url: 'getHomeService.asmx/getHome',
method: 'post',
data: {user:1},
dataType: 'json',
success: function (data) {
var jqueryXml = $(data);
$('#ImageUser').val(jqueryXml.find('Blog_Pic').text());
$('#LiteralTime').val(jqueryXml.find('Date1').text());
$('#Imageer').val(jqueryXml.find('Time1').text());
$('#LinkButtonBlogBy').val(jqueryXml.find('Blogby').text());
$('#ImageUser').val(jqueryXml.find('UserPic').text());
$('#TotalLike').val(jqueryXml.find('TotalLike').text());
$('#TotalComment').val(jqueryXml.find('TotalComment').text());
$('#Button').val(jqueryXml.find('LIKED').text());
$('#LiteralBlog').val(jqueryXml.find('Blog').text());
},error:function( err){
alert(err);
}
 

Answers (1)