Click here to Skip to main content
16,012,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am asp.net developer,
When i am calling a ajax request through jquery ,It is taking much time to render the page.
Please help me.
Posted
Comments
ZurdoDev 21-Mar-13 7:49am    
How can we help?
Raj G1 21-Mar-13 8:00am    
can u tell me the proper way to call ajax request
Raj G1 21-Mar-13 8:05am    
I m using the code:




function GetRecord() {
$.ajax({
type: "POST",
url: "abc.aspx/GetData",
data: "{NextPreviousYear:'" + parseInt($("#hdnNextPervious").val()) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessCall,
error: OnErrorCall
})
}

function OnSuccessCall(response) {
$j(document).ready(function () {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var tblcalendar = xml.find("Report");
$('.tbl_calendar').html('');
$.each(tblcalendar, function (index) {
var row = "<tr>";
row += "<th>" + $(this).find("Month").text() + "</th>";
row += "<td class=" + $(this).find("D1").text() + ">   </td>";
row += "<td class=" + $(this).find("D2").text() + ">   </td>";
row += "<td class=" + $(this).find("D3").text() + ">   </td>";
row += "<td class=" + $(this).find("D4").text() + ">   </td>";
row += "<td class=" + $(this).find("D5").text() + ">   </td>";
row += "<td class=" + $(this).find("D6").text() + ">   </td>";
row += "<td class=" + $(this).find("D7").text() + ">   </td>";
row += "<td class=" + $(this).find("D8").text() + ">   </td>";
row += "<td class=" + $(this).find("D9").text() + ">   </td>";
row += "<td class=" + $(this).find("D10").text() + ">   </td>";
row += "<td class=" + $(this).find("D11").text() + ">   </td>";
row += "<td class=" + $(this).find("D12").text() + ">   </td>";
row += "<td class=" + $(this).find("D13").text() + ">   </td>";
row += "<td class=" + $(this).find("D14").text() + ">   </td>";
row += "<td class=" + $(this).find("D15").text() + ">   </td>";
row += "<td class=" + $(this).find("D16").text() + ">   </td>";
row += "<td class=" + $(this).find("D17").text() + ">   </td>";
row += "<td class=" + $(this).find("D18").text() + ">   </td>";
row += "<td class=" + $(this).find("D19").text() + ">   </td>";
row += "<td class=" + $(this).find("D20").text() + ">   </td>";
row += "<td class=" + $(this).find("D21").text() + ">   </td>";
row += "<td class=" + $(this).find("D22").text() + ">   </td>";
row += "<td class=" + $(this).find("D23").text() + ">   </td>";
row += "<td class=" + $(this).find("D24").text() + ">   </td>";
row += "<td class=" + $(this).find("D25").text() + ">   </td>";
row += "<td class=" + $(this).find("D26").text() + ">   </td>";
row += "<td class=" + $(this).find("D27").text() + ">   </td>";
row += "<td class=" + $(this).find("D28").text() + ">   </td>";
row += "<td class=" + $(this).find("D29").text() + ">   </td>";
row += "<td class=" + $(this).find("D30").text() + ">   </td>";
row += "<td class=" + $(this).find("D31").text() + ">   </td>";
row += "</tr>";
$(".tbl_calendar").append(row);
});

});
}
function OnErrorCall(response) {
Sm.Abdullah 21-Mar-13 8:06am    
what you have
done so far ?
Raj G1 21-Mar-13 8:06am    
Please help me.

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