Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax Javasrcript Url not working in url written page
    primarykey
    data
    text
    <p>I am a beginner, I am binding data on my page scroll it's working fine without url rewritting.<br> When I rewrite's my page name data on page scrolling is not loading. </p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script src='&lt;%=ResolveUrl("../js/jquery-1.4.1.min.js") %&gt;' type="text/javascript"&gt;&lt;/script&gt; js file refrence &lt;script type="text/javascript"&gt; var pageIndex = 1; var pageCount; $(window).scroll(function () { if ($(window).scrollTop() == $(document).height() - $(window).height()) { GetRecords(); } }); function GetRecords() { pageIndex++; if (pageIndex == 2 || pageIndex &lt;= pageCount) { $("#loader").show(); $.ajax({ type: "POST", **url: "dashboard/GetCustomers",** Name of Url Rewritted Page. data: '{pageIndex: ' + pageIndex + '}', contentType: "application/json; charset=utf-8", dataType: "json", success: OnSuccess, failure: function (response) { alert(response.d); }, error: function (response) { alert(response.d); } }); } } function OnSuccess(response) { var xmlDoc = $.parseXML(response.d); var xml = $(xmlDoc); pageCount = parseInt(xml.find("PageCount").eq(0).find("PageCount").text()); var customers = xml.find("Customers"); customers.each(function () { var customer = $(this); var table = $("#dvCustomers table").eq(0).clone(true); $(".PopProfilePic", table).html(customer.find("ProfilePic").text()); $(".username", table).html(customer.find("Name").text()); $(".showID", table).html(customer.find("ShowID").text()); $(".userid", table).html(customer.find("UserID").text()); $(".date", table).html(customer.find("CreatedDate").text()); $(".photo", table).html(customer.find("Photo").text()); $(".postal", table).html(customer.find("UserID").text()); $(".country", table).html(customer.find("EmailID").text()); $(".phone", table).html(customer.find("PointStatus").text()); $("#dvCustomers").append(table).append("&lt;br /&gt;"); }); $("#loader").hide(); } &lt;/script&gt; </code></pre> <p>he Actual name of my page is UserHome.aspx and I am rewritting it to dashboard .<br> It works when i use page <strong>userhome.aspx/GetCustomer</strong> without url rewritting .Pleas correct me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload