Click here to Skip to main content
15,883,922 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i am try to refresh my web page for more times my web service files are not loading and my ajax functions are not at working. i try to find out the error but no error i am getting. the only error is my web service file are not loaded and my all ajax functions are not at executing. here is the link http://testing.way2hotel.com try to reload home page for more times(10 or 15) and any one can please check the error an let me knoww what error it is. here is the html page and the web service file are

HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />

<!--<link rel="stylesheet" type="text/css" href="themes/bootstrap/css/styles.css" />-->
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-responsive.css" />
<!--<link rel="stylesheet" type="text/css" href="assets/e3ecaab1/css/yii.css" />-->
<script type="text/javascript" src="assets/js/jquery.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.js"></script>
<title>Easylend.in | Home </title>
<link href="" rel="shortcut icon" type="" />
<!-- Custom Scripts -->
<!--<script type="text/javascript" src="js/general.js"></script>-->
<!--<script type="text/javascript" src="js/jcarousel.js"></script>-->

<link rel="stylesheet" type="text/css" href="css/template.css" />
<link rel="stylesheet" type="text/css" href="Style.css" />
<!--<link rel="stylesheet" type="text/css" href="css/jcarousel.css" />-->
<!--<script type="text/javascript">
function mycarousel_initCallback(carousel)
{
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        vertical: true,
        auto: 1,
		scroll:1,
        wrap: 'circular',
        initCallback: mycarousel_initCallback
    });
});

</script>-->
<style>
.container {
	width:1000px;
}
</style>
</head>

<body>
<!-- Start Header -->
<div class="header">
  <div class="">
    <div class="logo"style="margin-removed 211px;"><a href="index.html"><h1 style="font-size: 46px;">EASYLEND.IN</h1> <!--<img src="images/hotelspondy.png" alt="easylend.in" />-->
      <h2 style="font-weight:bold;font-size:12px;line-height:0px;margin-removed0;color:#000;"> Get a loan quickly </h2>
      </a></div>
    <div class="top-right" align="right">
     
      <div class="clear"></div>
      <div class="main-menu navigation pull-left" align="left"style="margin-removed 60px;margin-removed 5px;">
        <ul class="nav menu nav-pills">
         <li class="deeper parent "> <a href="index.html">HOME  |</a>
           <li class="deeper parent "> <a href="lender.html">LENDERS  |</a>
            <ul class="nav-child unstyled small">
              <li class=""> <a href="lender/how-to-lend.html">How to invest</a> </li>
              <li class=""> <a href="lender/know-your-borrower.html">Know your Borrower</a> </li>
              <li class=""> <a href="Listing/borrower-listings.html">Browse Borrower Listing</a> </li>
            </ul>
          </li>
          <li class="deeper parent "> <a href="borrowers.html">BORROWERS  |</a>
            <ul class="nav-child unstyled small">
              <li class=""> <a href="borrower/how-to-borrow.html">How to get a loan</a> </li>
              <li class=""> <a href="borrower/creating-effective-borrower-listing.html">How to create effective listing</a> </li>
              <li class=""> <a href="Listing/lender-listings.html">Browse Lender Listing</a> </li>
            </ul>
          </li>
          <li class="deeper parent "> <a href="#">LISTINGS  |</a>
            <ul class="nav-child unstyled small">
              <li class=""> <a href="Listing/borrower-listings.html">Borrower Listing </a> </li>
              <li class=""> <a href="Listing/lender-listings.html">Lender Listing </a> </li>
            </ul>
          </li>
          <li class="deeper parent "> <a href="group/group-lend.html">GROUP-LEND  |</a>
            <ul class="nav-child unstyled small">
              <li class="item-142"> <a href="groups.html">Groups</a> </li>
            </ul>
          </li>
          <li class="deeper parent "><a href="about.html" >ABOUT US |</a>
            <ul class="nav-child unstyled small">
              <li class=""><a href="about/management.html" >Management</a></li>
              <li class=""><a href="about/advisory-team.html" >Advisory Team</a></li>
              <!--<li class=""><a href="#" >Partners</a></li>
              <li class=""><a href="#">Media Room</a> </li>
              <li class=""><a href="#">Testimonials</a> </li>-->
              <li class=""><a href="careers.html">Careers</a> </li>
            </ul>
          </li>
          <li class="deeper parent" id="br_lender_signup"> <a href="#">SIGNUP  |</a> 
               <ul class="nav-child unstyled small">
                  <li class=""><a href="Signup/borrower-signup.html" >Borrower</a></li>
                  <li class=""><a href="Signup/lender-signup.htm" >Lender</a></li>
               </ul> 
          </li>
         <li id="login_user" class="deeper parent"> <a href="login.htm">LOGIN</a> </li>
         <li id="user_name_display" class="deeper parent"> <a id="lgn_uname"> </a> 
          <ul class="nav-child unstyled small"><li id="dashboard_link"></li><li id="user_br_logout"><a > Logout</a> </li> </ul>
         </li>
        </ul>
      </div>
      
    </div>
    <div class="clear"></div>
  </div>
  <!-- end container --> 
</div>
<!-- End Header -->
<!-- breadcrumbs -->

<div style="height:15px"></div>

<div style="width:100%;min-width:1000px;">

  <div style="width: 50%;height: 220px;background-color:#2C3C59;float:left;">
  <div style="width:500px;margin: 20px 0px 0px 200px; padding:10px;">
      <p class="harabara black" style="font-size:40px"><span class="blue1" style="color:#E6BB10;">Lending. </span><span class="white" >Making. </span><span style="color:#68BB48;">Helping.</span></p>
      <br />
      <p class="lucidagrande" style="font-size:20px;text-align: center;color: white;"> Lend money to someone for a limited time.  </p>
      <!--<p class="lucidagrande grey" style="font-size:12px;margin-removed0;">Easylend.in is an online peer-to-peer lending platform in India connecting individual borrowers and individual investors. Register today for free and create your loan / investment account!</p>-->
    </div>
    <div style="width:500px;margin: 0px 0px 0px 178px;">
      <div style=" padding:20px 0 20px 30px">
        
        <div style="float:left;"><a style="margin-removed10px;font-weight:bold;width: 145px;background: linear-gradient(to bottom, #E6BB10 0%,#E7D072 100%);border-bottom-color:#E7D072;" class="btn" href="#">LENDER</a>
        
        <div style="margin-removed 12px;padding-removed15px;"><h2 style="font-weight:bold;font-size:17px;line-height:0px;margin-removed0;color:#fff;"> Safely invest money </h2></div></div> 
        <div style="float:right;"> <a style="margin-removed10px;font-weight:bold;width: 145px;border-bottom-color: #68BB48 !important;background: linear-gradient(to bottom, #68BB48 0%,#90E072 100%);" class="btn" href="#">BORROWER</a>
        
        <div style="margin-removed 12px;padding-removed15px;"><h2 style="font-weight:bold;font-size:17px;line-height:0px;margin-removed0;color:#fff;"> Get a loan quickly </h2></div></div>
        <div class="clear"></div>
        
     </div>
    </div>
    
  </div>
  <div style="width: 50%;height: 220px;background-color:#2C3C59;float:left;text-align: center;">
    <img src="assets/img/hm1.png" />
    </div>
</div>
<div class="clear"></div>

<div class="container" style="padding:20px 0 0 0">
 <div class="raleway">
    <div style="font-size:20px;background:removed(images/circle-testimonial.png) no-repeat;"> About Easylend </div>
    <div style="float: left;width: 400px;padding: 30px;"><p style="padding-removed10px;font-size:12px;line-height:17px;margin:0;text-align: justify;">"Easylend is one of the best ways to get the little extra money when we are in dire need. The people are very friendly and have helped me in every possible way. Thanks to the entire team for the great work. "</p>
    <p class="green" style="padding:0px;margin:0;font-size:13px;line-height:20px;" >- Sanjai.</p></div>
    <div style="float: right;width: 400px;padding: 30px;"><p style="padding-removed10px;font-size:12px;line-height:17px;margin:0;text-align: justify;">"Easylend is one of the best ways to get the little extra money when we are in dire need. The people are very friendly and have helped me in every possible way. Thanks to the entire team for the great work. "</p>
    <p class="green" style="padding:0px;margin:0;font-size:13px;line-height:20px;" >- Imran Hussian.</p></div>
  </div>
  <div style="width: 470px; border-removed1px solid #EFEFEF;padding:5px 15px 5px 5px;float:left; font-family: 'Questrial', sans-serif;">
   <!-- <div style="font-size:20px; padding:17px 0 17px 75px;background:removed(images/circle-star.png) no-repeat;"> News & Updates </div>
    --> 
     <div style="padding:20px 30px 20px 30px">
        <div style="font-size:20px;border-removedsolid 2px #CBCBCB;padding-removed10px;color: #68BB48;"><span style="float:left">Borrower Listings</span> <span style="float:right"><a href="#"><img src="https://cdn3.iconfinder.com/data/icons/gray-user-toolbar/512/banker-24.png" /></a></span>
          <div class="clear"></div>
        </div>
        
        <div id="br_list_show"></div>

      <!--  <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0;">
          <div style="width:125px; height:32px;float:left;overflow:hidden;"><a href="#" class="Borroweridcls">MEM0002548</a></div>
          <div style="width:130px; float:left">
            <div style="font-size:12px;width:35px;float:left">wants</div>
            <div style="width:65px;float:left;text-align:right">100000</div>
          </div>
          <div style="width:160px; float:left">@ 24.00%   <span style="font-size:12px">for</span>
            <div style="float:right">12 Months</div>
          </div>
          <div style="width:300px; float:left; font-size:11px;">Education</div>
          <div class="clear"></div>
        </div>
       <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0;">
          <div style="width:125px; height:32px;float:left;overflow:hidden;"><a href="#" class="Borroweridcls">MEM0001885</a></div>
          <div style="width:130px; float:left">
            <div style="font-size:12px;width:35px;float:left">wants</div>
            <div style="width:65px;float:left;text-align:right">100000</div>
          </div>
          <div style="width:160px; float:left">@ 18.00%   <span style="font-size:12px">for</span>
            <div style="float:right">12 Months</div>
          </div>
          <div style="width:300px; float:left; font-size:11px;">Relocation Expenses</div>
          <div class="clear"></div>
        </div>
                <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0;">
          <div style="width:125px; height:32px;float:left;overflow:hidden;"><a href="#" class="Borroweridcls">MEM0002338</a></div>
          <div style="width:130px; float:left">
            <div style="font-size:12px;width:35px;float:left">wants</div>
            <div style="width:65px;float:left;text-align:right">75000</div>
          </div>
          <div style="width:160px; float:left">@ 18.00%   <span style="font-size:12px">for</span>
            <div style="float:right">12 Months</div>
          </div>
          <div style="width:300px; float:left; font-size:11px;">Wedding</div>
          <div class="clear"></div>
        </div>-->


           </div>
   
  </div>
  <div style="width: 470px; border-removed1px solid #EFEFEF;padding:5px 15px 5px 20px;float:left; font-family: 'Questrial', sans-serif">
   <!-- <div style="font-size:20px; padding:17px 0 17px 75px;background:removed(images/circle-cash.png) no-repeat;"> Loans Galore</div>-->
     <div style=" padding:20px 30px 20px 30px">
        <div style="font-size:20px;border-removedsolid 2px #CBCBCB;padding-removed10px;color: #E6BB10;"><span style="float:left">Investment Listings</span> <span style="float:right"><a href="#"><img src="https://cdn2.iconfinder.com/data/icons/money-operations/512/hand_money_give-24.png" /></a></span>
          <div class="clear"></div>
        </div>
        <div id="lender_list_show"></div>
       <!--  <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0; font-weight:100">
          <div style="width:125px;height:32px; float:left;overflow:hidden;"><a href="#" class="investeridcls">MEM0002550</a></div>
          <div style="width:190px; float:left" >
            <div style="font-size:12px;float:left">willing to Invest</div>
            <div style="float:left;width:80px;text-align:right;"> 25000 INR</div>
          </div>
          <div style="width:110px; float:left">@ 18.00%</div>
          <div style="width:300px; float:left;font-size:11px">Higher Returns</div>
          <div class="clear"></div>
        </div>
         <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0; font-weight:100">
          <div style="width:125px;height:32px; float:left;overflow:hidden;"><a href="#" class="investeridcls">MEM0002469</a></div>
          <div style="width:190px; float:left" >
            <div style="font-size:12px;float:left">willing to Invest</div>
            <div style="float:left;width:80px;text-align:right;">100000 INR</div>
          </div>
          <div style="width:110px; float:left">@ 19.00%</div>
          <div style="width:300px; float:left;font-size:11px">Higher Returns</div>
          <div class="clear"></div>
        </div>
         <div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0; font-weight:100">
          <div style="width:125px;height:32px; float:left;overflow:hidden;"><a href="#" class="investeridcls">MEM0002336</a></div>
          <div style="width:190px; float:left" >
            <div style="font-size:12px;float:left">willing to Invest</div>
            <div style="float:left;width:80px;text-align:right;">200000 INR</div>
          </div>
          <div style="width:110px; float:left">@ 18.00%</div>
          <div style="width:300px; float:left;font-size:11px">Higher Returns</div>
          <div class="clear"></div>
        </div>-->
              </div>
    <!--<ul style="list-style:removed(images/black-dot.png);">
      <li style="padding:10px 0 0 0;">Total Registrations: 2237</li>
      <li style="padding:10px 0 0 0;">Loan Amount Requested: <span class="rupeesymbol">`</span>11,05,95,000</li>
      <li style="padding:10px 0 0 0;">Investment Amount Offered: <span class="rupeesymbol">`</span>2,38,00,000</li>
      <li style="padding:10px 0 0 0;">Average Interest Rate: 18.41%</li>
    </ul>-->
   <!--  --></div>
 
  <div class="clear"></div>
</div>
<div class="clear"></div>
<!-- End body container -->
<div class="clear"></div>
<!-- start footer -->
<div class="footer">
  <div class="container" style="padding:20px 0;">
    <div class="footer-links">
      <ul>
        <li class="heading">About Easylend</li>
        <li><a href="index.html">Home</a></li>
        <li><a href="how-easylend-work.htm">How it Works</a></li>
        <li><a href="about.html">About Us</a></li>
        <li><a href="about/management.html">Management</a></li>
        <li><a href="about/advisory-team.html">Advisory</a></li>
      </ul>
    </div>
    <div class="footer-links">
      <ul>
        <li class="heading">Investors</li>
        <!--<li><a href="lender/how-to-lend.html">Why Invest</a></li>-->
        <li><a href="lender/how-to-lend.html">How to Lend</a></li>
        <li><a href="Listing/borrower-listings.html">Browse Borrower Listings</a></li>
        <!--<li><a href="#">How to read Borrower Listings</a></li>-->
        <li><a href="group/group-lend.html">Group Lending</a></li>
        <!--<li><a href="#">Testimonials</a></li>-->
        <li><a href="lender/lender-faq.html">Lender FAQs</a></li>
      </ul>
    </div>
    <div class="footer-links">
      <ul>
        <li class="heading">Borrowers</li>
        <!--<li><a href="#">Why Borrow</a></li>-->
        <li><a href="borrower/how-to-borrow.html">How to Borrow</a></li>
        <li><a href="Listing/lender-listings.html">Browse Lender Listings</a></li>
        <li><a href="borrower/creating-effective-borrower-listing.html">How to create effective listing</a></li>
        <li><a href="borrower/borrower-faq.html">Borrower FAQs</a></li>
      </ul>
    </div>
    <div class="footer-links">
      <ul>
        <li class="heading">General</li>
        <li><a href="contact-us.htm">Contact Us</a></li>
        <li><a href="general-faq.htm">FAQs</a></li>
        <li><a href="careers.html">Careers</a></li>
        <li><a href="legal-agreements.html">Legal Agreements</a></li>
      </ul>
    </div>
   </div>
  <!-- End Footer Container --> 
</div>
<div class="copyright">
  <div class="container">^__strong style="padding-removed25px;font-size:11px;">Copyright © 2014 Natura Web Solutions</div>
</div>
<!-- end footer -->
<!-- page -->




<script type="text/javascript" src="js/display_logout.js"></script>
<script type="text/javascript">
    // display if login
    var login_webservice = "webservice/login.asmx/ret_value";
    var br_db = "users/borrower/Dashboard.htm";
    var len_db = "users/lender/Dashboard.htm";

    var loginpage = "login.htm";
    var logout_webservice = "webservice/login.asmx/func_logout";

    login(login_webservice, br_db, len_db);
    // logout 
    function func_logout() {
        logout(logout_webservice, loginpage);
    }
    // End
</script>




<script type="text/javascript">

    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "webservice/ws_home.asmx/load_borrower_list",
        data: "{}",
        dataType: "json",
        success: function (setvalue) {
            if (setvalue.d[0].error == "true") {
                for (var i = 0; i < setvalue.d.length; i++) {
                    var br_append_value = '<div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0;"><div style="width:125px; height:32px;float:left;overflow:hidden;"><a href="view/borrower-view.htm?brid=' + setvalue.d[i].brid + '" class="Borroweridcls">' + setvalue.d[i].brid + '</a></div><div style="width:130px; float:left"><div style="font-size:12px;width:35px;float:left">wants</div> <div style="width:65px;float:left;text-align:right">' + setvalue.d[i].br_amount + '</div></div><div style="width:160px; float:left"> ' + setvalue.d[i].br_interest + ' %    <span style="font-size:12px">for</span> <div style="float:right"> ' + setvalue.d[i].br_duration + ' Months</div></div><div style="width:300px; float:left; font-size:11px;">' + setvalue.d[i].br_purpose + '</div><div class="clear"></div></div>';
                    $("#br_list_show").append(br_append_value);
                }
            }
            else {
                alert(setvalue.d[0].err_msg);
            }
        },
        failure: function () {
           // alert("failure");
        },
        error: function (response) {
           // alert("error" + response.d);
        }
    });

    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "webservice/ws_home.asmx/load_lender_list",
        data: "{}",
        dataType: "json",
        success: function (setvalue) {
            if (setvalue.d[0].error == "true") {
                for (var i = 0; i < setvalue.d.length; i++) {
                    var len_append_value = '<div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0; font-weight:100"><div style="width:125px;height:32px; float:left;overflow:hidden;"><a href="view/lender-view.htm?id=' + setvalue.d[i].lenid + '" class="investeridcls">' + setvalue.d[i].lenid + '</a></div><div style="width:190px; float:left" ><div style="font-size:12px;float:left">willing to Invest</div><div style="float:left;width:80px;text-align:right;">  ' + setvalue.d[i].len_amount + ' INR</div></div><div style="width:110px; float:left"> ' + setvalue.d[i].len_interest + ' %</div><div style="width:300px; float:left;font-size:11px">Higher Returns</div><div class="clear"></div></div>';
                    $("#lender_list_show").append(len_append_value);
                }

            }
            else {
                alert(setvalue.d[0].err_msg);
            }
        },
        failure: function () {
            //alert("failure");
        },
        error: function (response) {
           // alert("error" + response.d);
        }
    });

</script>



</body>


</html>
<pre lang="Javascript">

//web service files

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;

/// <summary>
/// Summary description for ws_home
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
[System.Web.Script.Services.ScriptService]
public class ws_home : System.Web.Services.WebService {
    dbcon con = new dbcon();
    drdb_DAL dtdal = new drdb_DAL();
    public ws_home () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public homelist[] load_borrower_list()
    {
        string query = string.Empty;
        con.mycon();
        List<homelist> lt_brlist = new List<homelist>();
        query = "select Top 5 bloan.borrower_id, bloan.bor_purpose, bloan.bor_amount, bloan.interest, bloan.loan_duration from borrower_required_loan_details bloan, borrower_pdetails bpdetails where bpdetails.profile_agreed='1' and bloan.borrower_id = bpdetails.borrower_id";
        DataTable dt = dtdal.dt_return(query);
        if (dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                homelist hlist = new homelist();
                hlist.brid = dr["borrower_id"].ToString();
                hlist.br_amount = dr["bor_amount"].ToString();
                hlist.br_purpose = dr["bor_purpose"].ToString();
                hlist.br_interest = dr["interest"].ToString();
                hlist.br_duration = dr["loan_duration"].ToString();
                hlist.error = "true";
                lt_brlist.Add(hlist);
            }
        }
        else
        {
            homelist hlist = new homelist();
            hlist.error = "false";
            lt_brlist.Add(hlist);
        }
        return lt_brlist.ToArray();
    }

    [WebMethod]
    public homelist[] load_lender_list()
    {
        string query = string.Empty;
        con.mycon();
        List<homelist> lt_brlist = new List<homelist>();
        query = "select Top 5 lloan.lender_id, lloan.invest_amount, lloan.invest_interest from lender_investment_details lloan, lender_details lpdetails where lpdetails.profile_agreed='1' and lloan.lender_id = lpdetails.lender_id";
        DataTable dt = dtdal.dt_return(query);
        if (dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                homelist hlist = new homelist();
                hlist.lenid = dr["lender_id"].ToString();
                hlist.len_amount = dr["invest_amount"].ToString();
                hlist.len_interest = dr["invest_interest"].ToString();
                hlist.error = "true";
                lt_brlist.Add(hlist);
            }
        }
        else
        {
            homelist hlist = new homelist();
            hlist.error = "false";
            lt_brlist.Add(hlist);
        }
        return lt_brlist.ToArray();
    }

    public class homelist
    {
        // Borrower
        public string brid { get; set; }
        public string br_amount { get; set; }
        public string br_interest { get; set; }
        public string br_month { get; set; }
        public string br_purpose { get; set; }
        public string br_duration { get; set; }
        // Lender
        public string lenid { get; set; }
        public string len_amount { get; set; }
        public string len_interest { get; set; }
        public string len_month { get; set; }
        public string len_purpose { get; set; }
        public string len_duration { get; set; }
        // Error
        public string error { get; set; }
        public string err_msg { get; set; }
        // End
    }
}
Posted
Updated 15-Dec-14 20:15pm
v2
Comments
Thanks7872 16-Dec-14 2:23am    
Remove unnecessary code,for example no html required to resolve this issue.

1 solution

JavaScript
$(document).ready(function () {
  // first call
  $.ajax({
    type: "POST",
    url: "/Remote.aspx/MethodA",
    data: {},
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (response) {
      // ???
    },
    failure: function (response) {
      // ???
    }
  });

  // second call
  $.ajax({
    type: "POST",
    url: "/Remote.aspx/MethodB",
    data: {},
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (response) {
      // ???
    },
    failure: function (response) {
      // ???
    }
  });
});
 
Share this answer
 
Comments
Member 11142833 16-Dec-14 2:26am    
thank your for your reply. but i did same thing what you mentioned above. instead of writing code in in aspx page i wrote code in webservice file so here i am calling webservice file.

This is my script file is it having any errors let me know

$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "webservice/ws_home.asmx/load_borrower_list",
data: "{}",
dataType: "json",
success: function (setvalue) {
if (setvalue.d[0].error == "true") {
for (var i = 0; i < setvalue.d.length; i++) {
var br_append_value = '<div style="font-size:13px;border-removedsolid 2px #CBCBCB;padding:10px 0 10px 0;"><div style="width:125px; height:32px;float:left;overflow:hidden;">' + setvalue.d[i].brid + '</div><div style="width:130px; float:left"><div style="font-size:12px;width:35px;float:left">wants</div> <div style="width:65px;float:left;text-align:right">' + setvalue.d[i].br_amount + '</div></div><div style="width:160px; float:left"> ' + setvalue.d[i].br_interest + ' % <span style="font-size:12px">for</span> <div style="float:right"> ' + setvalue.d[i].br_duration + ' Months</div></div><div style="width:300px; float:left; font-size:11px;">' + setvalue.d[i].br_purpose + '</div><div class="clear"></div></div>';
$("#br_list_show").append(br_append_value);
}
}
else {
alert(setvalue.d[0].err_msg);
}
},
failure: function () {
// alert("failure");
},
error: function (response) {
// alert("error" + response.d);
}
});

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900