TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aniruddh Kewat
NA
30
20.9k
how to send multiple parameters to web method ?
Jun 18 2015 12:22 AM
this is my code...
var pageIndex = 1;
var pageCount;
var categoryid = 0;
var brandtext = null;
var pricevalue = 0;
$(document).ready(function () {
$(window).scroll(function () {
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
GetRecords();
}
});
$('.clbtnmenu').click(function () {
categoryid = $(this).data('id');
//alert("Id : " + categoryid);
});
});
function GetRecords() {
pageIndex++;
/*retrieving text from rblbrands*/
var checked_radiobrands = $("[id*=rblbrands] input:checked");
//brandsvalue = checked_radiobrands.val();
brandtext = checked_radiobrands.closest("td").find("label").html();
/*retrieving text from rblpricerange*/
var checked_radioprice = $("[id*=rblpricerange] input:checked");
pricevalue = checked_radioprice.val();
//pricetext = checked_radioprice.closest("td").find("label").html();
alert('PageIndex : ' + pageIndex + ' , Page Count : ' + pageCount + ' , CategoryId : ' + categoryid + " BrandText : " + brandtext + " PriceValue :" + pricevalue);
if (pageIndex == 2 || pageIndex <= pageCount) {
$("#loader").show();
$.ajax({
type: "POST",
url: "WebForm1.aspx/GetCustomers",
//data: '{pageindex:' + pageIndex + 'CategoryId:' + categoryid + 'Brand:' + brandtext + 'Price:' + pricevalue +'}',
data: {pageindex: pageIndex,CategoryId: categoryid,Brand: brandtext,Price: pricevalue},
//data: { pageIndex: pageIndex, CategoryId: categoryid },
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert('Hell 1');
},
error: function (response) {
alert('Hell 2');
}
});
}
}
this is alerting: Hell 2 ......
Reply
Answers (
4
)
difference between two months
linkbutton is not working on second click ?